-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Enable dynamic filter pushdown for LEFT/RIGHT/SEMI/ANTI/Mark joins; surface probe metadata in plans; add join-preservation docs #17090
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
Open
kosiew
wants to merge
80
commits into
apache:main
Choose a base branch
from
kosiew:non-inner-join-filter-pushdown-16973
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.
+1,599
−686
Open
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
2a194f1
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew ab81469
```
kosiew 15c8897
Refactor join logic in test file to improve filter application and ex…
kosiew c960bda
Fix filter application order in RightAnti join execution plan
kosiew 1076e8b
Enhance dynamic filter pushdown documentation for joins pushdown
kosiew fb1c85c
Implement dynamic filter pushdown for various join types in HashJoinE…
kosiew adf1207
Implement dynamic filter handling for various join types in HashJoinExec
kosiew 081bed0
Refactor static filter pushdown test to include predicate in DataSour…
kosiew 4675cbc
Add predicate information to explain tree output for parquet format
kosiew 78b9f37
Implement deduplication for join key pairs and partition expressions;…
kosiew 94e3492
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew 6527085
Refactor: Remove inferred predicate alias handling and related tests
kosiew 444ed6d
Merge branch 'pushdown-16973' into non-inner-join-filter-pushdown-16973
kosiew b258ead
fix fmt errors
kosiew ea4776a
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew 4a497ff
docs: improve documentation for dynamic filter pushdown configuration
kosiew f78b8a5
test: add dynamic filter pushdown tests for right semi and right anti…
kosiew e336ad9
Enhance documentation for dynamic filters in joins
kosiew d24cd4f
Add tests for disabled dynamic filter pushdown on hash joins
kosiew 9f4411a
Refactor dynamic filtering in HashJoinExec
kosiew e5bf484
Update explain_tree.slt to reflect changes in predicate representatio…
kosiew 1eba0d0
Refactor dynamic filter pushdown documentation for clarity and comple…
kosiew c48e8c1
Improve changelog entry for dynamic filter pushdown in version 50.0.0…
kosiew 41f2e1e
Enhance upgrading documentation to include details on dynamic filter …
kosiew 4d507c4
Update dynamic filter pushdown description for clarity and detail
kosiew 25254ab
Enhance documentation for dynamic filter pushdown, clarifying join ty…
kosiew 7ec2553
Update predicate display in TestSource to show '<none>' for absent pr…
kosiew 25b4dfb
Add tests for dynamic filter pushdown in HashJoinExec, including null…
kosiew 6d5b6ce
Update dynamic filter pushdown documentation and configuration descri…
kosiew 9c2ba0b
Enhance dynamic filter pushdown documentation to include support for …
kosiew 051c310
Update predicate display in explain_tree.slt to show 'true' instead o…
kosiew feeb231
Update dynamic filter pushdown description to clarify requirements fo…
kosiew f9c3cd0
Enhance dynamic filter functionality by adding key count tracking and…
kosiew 47c2491
Refactor dynamic filter handling in HashJoinExec to clarify probe sid…
kosiew 2c32098
Enforce non-empty ON clause requirement in HashJoinExec and enhance d…
kosiew ec47ed7
Add join preservation utilities and refactor related functions for cl…
kosiew 5eabb36
Refactor dynamic filter display logic in HashJoinExec for clarity and…
kosiew 014bed8
Refactor dynamic filter handling in joins and update related document…
kosiew 92ed50d
Enhance dynamic filter observability and error handling. Add inline c…
kosiew 853fa6c
Enhance dynamic filter pushdown tests and output formatting. Update a…
kosiew 5d2b60c
Refactor dynamic filter handling and enhance documentation. Clean up …
kosiew 51bcf4a
Enhance dynamic filter pushdown tests and improve output clarity. Add…
kosiew 4ceb8dd
Enhance join execution details in tests. Update expected output to in…
kosiew 10c2171
Enhance multi_hash_joins test output. Include probe side and probe ke…
kosiew 02596fc
Fix probe side and keys in multi_hash_joins test output. Adjust forma…
kosiew 24f6367
Fix probe side determination in multi_hash_joins test output. Adjust …
kosiew 0b1fc31
Implement snap changes to enhance functionality and improve performance
kosiew 910a7ed
Enhance test output for filter pushdown and projection pushdown. Incl…
kosiew f64d072
Fix probe side determination in HashJoinExec output. Adjust formattin…
kosiew 40d36d7
Fix HashJoinExec output to include probe side and keys for improved c…
kosiew 4f9f94a
Fix HashJoinExec output to include probe side and keys for improved c…
kosiew be9d8de
Fix assertions in hash join dynamic filter pushdown tests to correctl…
kosiew 0cc204e
Add probe side and keys information to HashJoinExec output in join se…
kosiew 6958ffd
Merge branch 'pushdown-16973' into non-inner-join-filter-pushdown-16973
kosiew b38b0b9
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew b8f5d5c
Remove redundant tests for right semi and right anti dynamic filter p…
kosiew 8b1bb07
Enhance dynamic filter pushdown tests for right semi and right anti j…
kosiew 5c03033
Fix fmt errors
kosiew a49749b
Update documentation for dynamic filters in joins to clarify filter t…
kosiew f81a9ab
Fix clippy error
kosiew d7e36cb
prettier config docs
kosiew 146fc28
fix(tests): update snapshot for topk dynamic filter pushdown test
kosiew f197d1b
fix(tests): update assertions for dynamic filter pushdown tests
kosiew 3aa1659
feat(config): add option to enable dynamic filter pushdown in optimizer
kosiew 49cafb3
fix(docs): enhance description for dynamic filter pushdown in optimizer
kosiew 90c15f4
Bless SLT outputs via CI (--complete)
github-actions[bot] d07afea
feat(join): add preservation methods for join types and remove unused…
kosiew 8f63f08
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew 01c366f
docs(tests): enhance comments for join type handling and dynamic filt…
kosiew bafcf29
test: enhance dynamic filter pushdown tests for hash joins
kosiew 1395b49
refactor(tests): remove redundant hash join parent filter pushdown test
kosiew 4799c01
refactor(tests): consolidate tests
kosiew b2cc0a5
refactor(tests): clean up imports and remove unused join type referen…
kosiew 7a3c6db
Rearrange tests to minimize diff
kosiew 08a0e29
docs(tests): add issue reference for dynamic filter pushdown test
kosiew 7b6f778
refactor(tests): add dynamic filter location assertion and predicate …
kosiew 3023d88
fix tests
kosiew 4beb2f7
refactor(tests): remove unused predicate accessor from TestSource
kosiew f999914
test: add async test for hash join with probe filter
kosiew 704aba7
Merge branch 'main' into non-inner-join-filter-pushdown-16973
kosiew 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,63 @@ impl JoinType { | |
| JoinType::RightAnti | ||
) | ||
} | ||
/// Returns true if the left side of this join preserves its input rows | ||
/// for filters applied *after* the join. | ||
#[inline] | ||
pub const fn preserves_left_for_output_filters(self) -> bool { | ||
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. I arrived at this same refactor in #17153 - I think it's a good one. Can we pull this out into its own PR? |
||
matches!( | ||
self, | ||
JoinType::Inner | ||
| JoinType::Left | ||
| JoinType::LeftSemi | ||
| JoinType::LeftAnti | ||
| JoinType::LeftMark, | ||
) | ||
} | ||
|
||
/// Returns true if the right side of this join preserves its input rows | ||
/// for filters applied *after* the join. | ||
#[inline] | ||
pub const fn preserves_right_for_output_filters(self) -> bool { | ||
matches!( | ||
self, | ||
JoinType::Inner | ||
| JoinType::Right | ||
| JoinType::RightSemi | ||
| JoinType::RightAnti | ||
| JoinType::RightMark, | ||
) | ||
} | ||
|
||
/// Returns true if the left side of this join preserves its input rows | ||
/// for filters in the join condition (ON-clause filters). | ||
#[inline] | ||
pub const fn preserves_left_for_on_filters(self) -> bool { | ||
matches!( | ||
self, | ||
JoinType::Inner | ||
| JoinType::Right | ||
| JoinType::LeftSemi | ||
| JoinType::RightSemi | ||
| JoinType::RightAnti | ||
| JoinType::RightMark, | ||
) | ||
} | ||
|
||
/// Returns true if the right side of this join preserves its input rows | ||
/// for filters in the join condition (ON-clause filters). | ||
#[inline] | ||
pub const fn preserves_right_for_on_filters(self) -> bool { | ||
matches!( | ||
self, | ||
JoinType::Inner | ||
| JoinType::Left | ||
| JoinType::LeftSemi | ||
| JoinType::RightSemi | ||
| JoinType::LeftAnti | ||
| JoinType::LeftMark, | ||
) | ||
} | ||
} | ||
|
||
impl Display for JoinType { | ||
|
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.
I see a lot of use of
#[inline]
. My understanding is that without specific evidence that it helps performance it may actually sometimes hurt it and it's best to not throw it around unless it's very obvious or can be proven to help performance.