-
Notifications
You must be signed in to change notification settings - Fork 867
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
Use Arrow take kernel within ListArrayReader #1490
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1490 +/- ##
==========================================
+ Coverage 82.72% 82.76% +0.03%
==========================================
Files 188 188
Lines 54286 54241 -45
==========================================
- Hits 44908 44891 -17
+ Misses 9378 9350 -28
Continue to review full report at Codecov.
|
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.
The best kind of PR 🎉
Left some minor nits
parquet/src/arrow/array_reader.rs
Outdated
let batch_values = match non_null_list_indices.len() { | ||
l if l == def_levels.len() => next_batch_array.clone(), | ||
_ => { | ||
let indices = UInt32Array::from(non_null_list_indices); |
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.
You could remove the collect
and then use from_iter_values
, aside from being faster, this would also avoid unnecessary work in the no-nulls case.
parquet/src/arrow/array_reader.rs
Outdated
None | ||
} else { | ||
Some(index as u32) |
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 could be more concisely written as (*def > self.list_empty_def_level).then(|| index as u32)
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.
Even better now 😄
Thank you @tustvold 😄 |
Thank you @alamb |
Which issue does this PR close?
Closes #1482.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?