Adjustment of HashJoinExec APIs to Preserve Probe Side Order #6858
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?
Closes #6857
Rationale for this change
In theory, we can maintain the order of records on the probe side of the hash join. This ordering preservation can be applied to Inner, RightSemi, and RightAnti joins.
The implementation changes in this pull request are designed to leverage this aspect of hash join operations, thereby eliminating unnecessary sort operations. Consequently, this enhancement is expected to result in improved performance, particularly in scenarios where the probe side of the hash join operation is already sorted.
What changes are included in this PR?
Adjustment of HashJoinExec APIS: We have modified the HashJoinExec operation to preserve the order of its probe side in Inner, RightSemi, and RightAnti joins, thereby eliminating unnecessary sort operations.
Bug Fix on Sort Pushdown Rule: We have fixed a minor bug in the Sort Pushdown rule.
Are these changes tested?
The new tests are included in the
join_disable_repartition.slt
file.Are there any user-facing changes?
No.
cc @Dandandan