Skip to content

ARROW-6944: [Rust] Add String, FixedSizeBinary types#5722

Closed
nevi-me wants to merge 7 commits intoapache:masterfrom
nevi-me:RROW-6944
Closed

ARROW-6944: [Rust] Add String, FixedSizeBinary types#5722
nevi-me wants to merge 7 commits intoapache:masterfrom
nevi-me:RROW-6944

Conversation

@nevi-me
Copy link
Copy Markdown
Contributor

@nevi-me nevi-me commented Oct 24, 2019

This PR creates a StringArray which behaves exactly like the current BinaryArray, then restricts the BinaryArray to dealing with binary data only. It also adds a FixedSizeBinaryArray which is backed by a FixedSizeListArray.

@nevi-me
Copy link
Copy Markdown
Contributor Author

nevi-me commented Oct 24, 2019

I need to add/clean up documentation, and add more tests, but otherwise the types and their arrays are working.

@github-actions
Copy link
Copy Markdown

@nevi-me nevi-me marked this pull request as ready for review October 25, 2019 18:52
@nevi-me
Copy link
Copy Markdown
Contributor Author

nevi-me commented Oct 25, 2019

@andygrove @paddyhoran @liurenjie1024 PTAL. This completes the basic types that we need for most of our integration testing. Other types like Decimal, Timestamp with timezone would be nice, but I don't need them to complete the work on #4167

Copy link
Copy Markdown
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.

LGTM! Thanks @nevi-me

Copy link
Copy Markdown
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Left some comments.

Comment thread rust/arrow/src/array/array.rs Outdated
Comment thread rust/arrow/src/array/array.rs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This may be unnecessary because Buffer already has alignment check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed it and got test failures, I've left it in for now

Comment thread rust/arrow/src/array/array.rs Outdated
Copy link
Copy Markdown
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.

Couple of nits, thanks @nevi-me

Comment thread rust/arrow/src/array/array.rs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we be checking that i + offset < len instead of just i?

Also, returning a Result is probably unnecessary but maybe use expect instead of unwrap.

Comment thread rust/arrow/src/array/array.rs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same 2 points as above.

@nevi-me
Copy link
Copy Markdown
Contributor Author

nevi-me commented Nov 1, 2019

@paddyhoran @liurenjie1024 I've addressed review comments

@liurenjie1024
Copy link
Copy Markdown
Contributor

LGTM. Thanks @nevi-me

@nevi-me nevi-me closed this in 77d4d49 Nov 4, 2019
@nevi-me nevi-me deleted the RROW-6944 branch November 4, 2019 16:08
@asfimport asfimport mentioned this pull request Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants