-
Notifications
You must be signed in to change notification settings - Fork 837
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
Improve take
kernel performance on primitive arrays, fix bad null index handling (#4404)
#4405
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,12 @@ impl<T: ArrowNativeType> From<Vec<T>> for ScalarBuffer<T> { | |
} | ||
} | ||
|
||
impl<T: ArrowNativeType> FromIterator<T> for ScalarBuffer<T> { | ||
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self { | ||
iter.into_iter().collect::<Vec<_>>().into() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An important thing to note is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please add this (very interesting) information as a comment inline? |
||
} | ||
} | ||
|
||
impl<'a, T: ArrowNativeType> IntoIterator for &'a ScalarBuffer<T> { | ||
type Item = &'a T; | ||
type IntoIter = std::slice::Iter<'a, T>; | ||
|
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.
This is vital for the performance of take_bits