-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(parquet): Enable Parquet filter_pushdown by default, with heurstic fallback when projecting few non-filter columns
#23420
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
Draft
zhuqi-lucas
wants to merge
18
commits into
apache:main
Choose a base branch
from
zhuqi-lucas:qizhu/parquet-pushdown-adaptive-gate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2784001
feat(parquet): decline pushdown when projection has few non-filter co…
zhuqi-lucas 0238f7b
Address alamb review: add config opt-out, upgrade guide, plan-display…
zhuqi-lucas bd02d23
fmt: cargo fmt after merging upstream/main
zhuqi-lucas 6b392b8
Restrict gate to file-schema columns (Copilot review)
zhuqi-lucas 4f05bbb
Fix CI test compile: add pushdown_filter_narrow_projection_gate to tw…
zhuqi-lucas 04fe24c
Fix CI test failures: opt tests out of narrow-projection gate
zhuqi-lucas 9d6e41f
Defensive: skip gate when dynamic filter present + preserve source pu…
zhuqi-lucas d52588a
test: disable narrow-projection gate in virtual-column rejection test
zhuqi-lucas dd2f89e
slt: disable narrow-projection gate in pushdown-focused test files
zhuqi-lucas 751f94d
slt: disable narrow-projection gate in 3 more pushdown-focused test f…
zhuqi-lucas 172dc16
test(sqllogictest): opt out of narrow-projection gate in dynamic_filt…
zhuqi-lucas 5f70c28
REname options
alamb abcf979
reorder for consistency
alamb b4463b4
reorder
alamb e427809
clean
alamb 25744e0
fix: force pushdown_filter_mode=Always in json_shredding example
zhuqi-lucas e6e0072
feat: flip pushdown_filters default to true
zhuqi-lucas 955d49e
Merge branch 'main' into qizhu/parquet-pushdown-adaptive-gate
zhuqi-lucas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ use datafusion::{ | |
| physical_plan::metrics::MetricsSet, | ||
| prelude::{ParquetReadOptions, SessionConfig, SessionContext}, | ||
| }; | ||
| use datafusion_common::config::ParquetPushdownFilterMode; | ||
| use datafusion_expr::{Expr, LogicalPlan, LogicalPlanBuilder}; | ||
| use datafusion_physical_plan::metrics::MetricValue; | ||
| use parquet::arrow::ArrowWriter; | ||
|
|
@@ -323,6 +324,10 @@ impl ContextWithParquet { | |
| Unit::RowGroup(row_per_group) => { | ||
| config = config.with_parquet_bloom_filter_pruning(true); | ||
| config.options_mut().execution.parquet.pushdown_filters = true; | ||
| // force unconditional pushdown to test so the filters are | ||
| // applied for TopK dynamic RG pruning | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Amazing, really nice now! |
||
| config.options_mut().execution.parquet.pushdown_filter_mode = | ||
| ParquetPushdownFilterMode::Always; | ||
| make_test_file_rg( | ||
| scenario, | ||
| row_per_group, | ||
|
|
@@ -340,6 +345,10 @@ impl ContextWithParquet { | |
| config = config.with_parquet_bloom_filter_pruning(true); | ||
| config = config.with_parquet_page_index_pruning(true); | ||
| config.options_mut().execution.parquet.pushdown_filters = true; | ||
| // force unconditional pushdown to test so the filters are | ||
| // applied for TopK dynamic RG pruning | ||
| config.options_mut().execution.parquet.pushdown_filter_mode = | ||
| ParquetPushdownFilterMode::Always; | ||
| make_test_file_rg( | ||
| scenario, | ||
| row_per_group, | ||
|
|
||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This is my proposed configuration API -- an enum to control the filter pushdown behavior (and we will add fancier ones here like
auto😎 )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.
Looks great!