feat: union nested Parquet leaves across projection accesses - #24130
Open
goutamadwant wants to merge 1 commit into
Open
feat: union nested Parquet leaves across projection accesses#24130goutamadwant wants to merge 1 commit into
goutamadwant wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24130 +/- ##
========================================
Coverage 81.04% 81.04%
========================================
Files 1105 1105
Lines 380092 380201 +109
Branches 380092 380201 +109
========================================
+ Hits 308041 308139 +98
- Misses 53835 53840 +5
- Partials 18216 18222 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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?
get_field) instead of reading the whole column #24121.Rationale for this change
When one projected nested column is consumed through multiple narrowing casts, or through both a narrowing cast and
get_field, the Parquet read plan currently falls back to reading the entire root column. The leaves required by those consumers can be combined, so reading the full root performs unnecessary I/O.What changes are included in this PR?
get_fieldaccesses to the same union.get_field, and casts that diverge belowList<Struct>.Are these changes tested?
Yes. The following checks pass:
cargo fmt --all -- --checkcargo test -p datafusion-datasource-parquet --libcargo test --profile=ci --test sqllogictests -- parquet_nested_schema_pruning.sltcargo clippy -p datafusion-datasource-parquet --all-targets --all-features -- -D warningsThe SQL logic test also verifies that the merged projections return the expected values and scan fewer bytes than a full-root read.
Are there any user-facing changes?
No API or SQL behavior changes. Queries with multiple nested accesses to the same Parquet root can read fewer leaf columns.