Encapsulate early File pruning in parquet opener in its own stream#17293
Merged
alamb merged 1 commit intoapache:mainfrom Aug 24, 2025
Merged
Encapsulate early File pruning in parquet opener in its own stream#17293alamb merged 1 commit intoapache:mainfrom
alamb merged 1 commit intoapache:mainfrom
Conversation
621bce4 to
9332bb4
Compare
alamb
commented
Aug 22, 2025
| let files_ranges_pruned_statistics = | ||
| file_metrics.files_ranges_pruned_statistics.clone(); | ||
|
|
||
| stream::try_unfold( |
Contributor
Author
There was a problem hiding this comment.
the core idea is to move this try_unfold closure into a real structure -- all the logic is the same, but I think it is easier to understand in its own, documented Stream struct
Contributor
|
This is ready to rebase and take out of draft! |
9332bb4 to
14baad7
Compare
alamb
commented
Aug 22, 2025
| ) | ||
| .boxed()) | ||
| } else { | ||
| Ok(stream.boxed()) |
Contributor
Author
There was a problem hiding this comment.
I think this is also a bit easier to understand that the pruning only happens when we have an file pruner
Contributor
Author
Done! |
adriangb
approved these changes
Aug 22, 2025
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?
Rationale for this change
While reviewing #16433 (see #16433 (comment))
What changes are included in this PR?
Extract out the early termination code into its own stream structure
Are these changes tested?
By existing tests
Are there any user-facing changes?
No, this is internal refactoring only