Extract shared ParquetReadPlan for leaf column resolution#20913
Open
friendlymatthew wants to merge 2 commits intoapache:mainfrom
Open
Extract shared ParquetReadPlan for leaf column resolution#20913friendlymatthew wants to merge 2 commits intoapache:mainfrom
ParquetReadPlan for leaf column resolution#20913friendlymatthew wants to merge 2 commits intoapache:mainfrom
Conversation
9e7475e to
c59c746
Compare
c59c746 to
8499b91
Compare
adriangb
reviewed
Mar 12, 2026
Contributor
adriangb
left a comment
There was a problem hiding this comment.
I take it the idea is that this can be re-used for the projection side of things because it was written in a reusable manner, even thought at the moment it is only used for the row filter?
I generally like this change :)
| || self.is_nested_type_supported(return_type) | ||
| { | ||
| // try to resolve all field name arguments to strinrg literals | ||
| // if any argument is not a string literal, we can not determine the exact |
Contributor
There was a problem hiding this comment.
Under what circumstances would get_field accept non-string literal arguments? Would this be a column e.g. get_field(struct_col, fields_col)?
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.
Note: please review from the second commit. This PR is currently based off of #20854
Rationale for this change
This PR extracts a reusable
build_parquet_read_planfunction andParquetReadPlanstruct from the row filter'sFilterCandidateBuilder::buildToday, struct-aware leaf projection only exists in the row filter path. The opener still uses
ProjectionMask::rootswhich reads all leaves of a struct even when only one field is needed. By pulling this logic into a shared abstraction, the opener can reduce unnecessary I/O for struct-heavy schemas