-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Encapsulate early File pruning in parquet opener in its own stream #17293
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
Conversation
621bce4
to
9332bb4
Compare
let files_ranges_pruned_statistics = | ||
file_metrics.files_ranges_pruned_statistics.clone(); | ||
|
||
stream::try_unfold( |
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 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
This is ready to rebase and take out of draft! |
9332bb4
to
14baad7
Compare
) | ||
.boxed()) | ||
} else { | ||
Ok(stream.boxed()) |
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.
I think this is also a bit easier to understand that the pruning only happens when we have an file pruner
Done! |
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