Skip to content

feat: Create dynamic filters in SortMergeJoin#21267

Draft
stuhood wants to merge 5 commits intoapache:mainfrom
paradedb:stuhood.smj-dynamic-filter-creation
Draft

feat: Create dynamic filters in SortMergeJoin#21267
stuhood wants to merge 5 commits intoapache:mainfrom
paradedb:stuhood.smj-dynamic-filter-creation

Conversation

@stuhood
Copy link
Copy Markdown
Contributor

@stuhood stuhood commented Mar 31, 2026

Which issue does this PR close?

Rationale for this change

This change fixes #20443, and adds support for generating dynamic filters for the left and right sides of a SortMergeJoin, in order to allow for range-based pruning of both sides of the join. Some consumers of the dynamic filter may even be able to seek/skip ahead on their inputs.

What changes are included in this PR?

To allow SortMergeJoin to actually propagate dynamic filters down to scans and get things working end to end, it was necessary to fix the handle_child_pushdown_result implementations of a variety of nodes which were failing to clone and update themselves.

Are these changes tested?

Yes.

Are there any user-facing changes?

Explain will now show dynamic filters for SortMergeJoin, and for the scans that they consume.

@github-actions github-actions bot added the core Core DataFusion crate label Mar 31, 2026
@stuhood
Copy link
Copy Markdown
Contributor Author

stuhood commented Mar 31, 2026

Supersedes #20455.

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) physical-plan Changes to the physical-plan crate labels Mar 31, 2026
@stuhood stuhood force-pushed the stuhood.smj-dynamic-filter-creation branch from 7bb33b9 to ff61597 Compare March 31, 2026 05:07
@stuhood stuhood force-pushed the stuhood.smj-dynamic-filter-creation branch from ff61597 to d7dcdd5 Compare March 31, 2026 05:29
@stuhood stuhood marked this pull request as draft March 31, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support filter pushdown through SortMergeJoinExec

2 participants