Repository navigation
perf: don't build a parquet stream for a file range with no row group left - #26476
Conversation
|
|
||
| /// Drives a [`ParquetMorselizer`] to completion and returns how many | ||
| /// morsels it produced. | ||
| async fn count_morsels( |
There was a problem hiding this comment.
Only used by tests, I could put a #[cfg(test)] on it?
This also is a bit hacky but I opted not to care because it was just for tests but happy to clean it up a bit :)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26476 +/- ##
=======================================
Coverage 82.90% 82.90%
=======================================
Files 1154 1154
Lines 457654 457729 +75
Branches 457654 457729 +75
=======================================
+ Hits 379398 379465 +67
- Misses 55252 55256 +4
- Partials 23004 23008 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thank you @Braedon-Wooding-Displayr
I had a few suggestions
| let mut prepared_row_groups = (*prepared).prune_row_groups()?; | ||
| if prepared_row_groups | ||
| .row_groups | ||
| .row_group_indexes() |
There was a problem hiding this comment.
maybe could check with empty()?
|
|
||
| /// Drives a [`ParquetMorselizer`] to completion and returns how many | ||
| /// morsels it produced. | ||
| async fn count_morsels( |
Addresses review feedback on apache#26476: replace the inline row_group_indexes().next().is_none() checks with a named helper. RowGroupAccessPlanFilter::is_empty() cannot be used here because it reports whether the file has zero row groups, not whether every row group has been pruned. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
I merged up to get the PR flowing |
|
Sorry for not promptly following up! Thank you @alamb |
I've got a few fixes to upstream so just starting with small ones.
Which issue does this PR close?
Rationale for this change
If row-group statistics or Bloom filters prune every row group in a file range, the opener still builds the decoder read plans, the decoder and the row filter, then hands back a stream morsel that yields nothing.
PruneFilealready ends early when file statistics prune the range; this does the same once row-group pruning has.What changes are included in this PR?
PruneWithStatisticsandPruneWithBloomFiltersreturnParquetOpenState::Donewhen no row group survives.What is the testing strategy for this PR?
Testing to ensure that we do actually skip them!
Are there any user-facing changes?
Nope!