support from_slice for binary, string, and boolean array types#1589
Merged
support from_slice for binary, string, and boolean array types#1589
Conversation
houqp
approved these changes
Jan 17, 2022
Member
Author
|
@houqp after this is merged i guess you can rebase arrow2 branch onto master and reduce some amount of diffs |
alamb
approved these changes
Jan 17, 2022
| I: AsRef<[u8]>, | ||
| { | ||
| fn from_slice(slice: S) -> Self { | ||
| let slice = slice.as_ref(); |
Contributor
There was a problem hiding this comment.
I wonder if this could call from_iter_values rather than replicate the code in DataFuson?
I haven't tried but perhaps something like
fn from _slice(slice: S) -> Self {
GenericBinaryArray::from_iter_values(slice.iter())?
https://docs.rs/arrow/7.0.0/arrow/array/struct.GenericStringArray.html#method.from_iter_values
Member
Author
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
i guess this change is necessary:
alamb
approved these changes
Jan 17, 2022
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #.
Rationale for this change
the motivation is to ease the transition of APIs onto arrow2
What changes are included in this PR?
Are there any user-facing changes?