Skip to content

Conversation

@ntrinquier
Copy link

No description provided.

@paddyhoran
Copy link
Contributor

Thanks @ntrinquier, can you change the title to "ARROW-4377: [Rust] Implement std::fmt::Debug for PrimitiveArrays" please. I'll take a look when I get a chance.

@paddyhoran
Copy link
Contributor

Also, CI is failing due to formatting issues. We use nightly compiler but stable rust fmt so you can run cargo +stable fmt --all -- --check.

@ntrinquier ntrinquier changed the title ARROW-4377: Implement std::fmt::Debug for PrimitiveArrays ARROW-4377: [Rust] Implement std::fmt::Debug for PrimitiveArrays Feb 16, 2019
@codecov-io
Copy link

codecov-io commented Feb 16, 2019

Codecov Report

Merging #3663 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3663      +/-   ##
==========================================
- Coverage   87.84%   87.78%   -0.06%     
==========================================
  Files         689      689              
  Lines       84014    84014              
  Branches     1081     1081              
==========================================
- Hits        73798    73752      -46     
- Misses      10103    10151      +48     
+ Partials      113      111       -2
Impacted Files Coverage Δ
go/arrow/math/uint64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/float64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/memory/memory_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/int64_sse4_amd64.go 0% <0%> (-100%) ⬇️
go/arrow/math/float64_amd64.go 33.33% <0%> (-33.34%) ⬇️
go/arrow/math/int64_amd64.go 33.33% <0%> (-33.34%) ⬇️
go/arrow/math/uint64_amd64.go 33.33% <0%> (-33.34%) ⬇️
go/arrow/math/math_amd64.go 36.84% <0%> (-26.32%) ⬇️
go/arrow/memory/memory_amd64.go 42.85% <0%> (-14.29%) ⬇️
cpp/src/arrow/csv/column-builder.cc 95.39% <0%> (-1.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 524a9dc...c0e7d55. Read the comment docs.

Copy link
Contributor

@nevi-me nevi-me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on Nicolas, please see my inline comment.

}

#[test]
fn test_boolean_fmt_debug() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you please add tests for null values, I don't think you handle them because getting a null value returns invalid data.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do! Thanks

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far. I'd like to see those unwraps removed in favor of returning an error result though (I'm guilty of using unwrap too, but I think it won't be hard to make the change here).

T::get_data_type(),
self.len()
)
.unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to return fmt::Result(Error) rather than call unwrap here

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ntrinquier what do you think about displaying the array values vertically?

This would be more consistent with C++/Python and make it easier to debug larger arrays.

Also, if we want to debug nested arrays in the future we can use the vertical indentation to help display the nesting levels.

@ntrinquier
Copy link
Author

@paddyhoran It leaves more unused space but I guess it is better to be consistent (plus as you said, with nesting it will actually be much better if displayed vertically).

Copy link
Contributor

@nevi-me nevi-me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, LGTM, thanks @ntrinquier

@kszucs
Copy link
Member

kszucs commented Feb 17, 2019

CI failure is unrelated, merging. Thanks @ntrinquier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants