-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support from_slice for binary, string, and boolean array types #1589
Conversation
@houqp after this is merged i guess you can rebase arrow2 branch onto master and reduce some amount of diffs |
I: AsRef<[u8]>, | ||
{ | ||
fn from_slice(slice: S) -> Self { | ||
let slice = slice.as_ref(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess this change is necessary:
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?