-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement RightSemi join for SortMergeJoin #13584
base: main
Are you sure you want to change the base?
Conversation
8d8c5ca
to
6976ce4
Compare
6976ce4
to
319b87c
Compare
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.
Thanks @athultr1997
I'll check the tests later this week.
Unfortunately we cannot call RIGHT SEMI/ RIGHT ANTI directly from SQL, it can be chosen by the optimizer so I'm feeling we need to focus more on unit tests
JoinType::RightSemi, | ||
None, | ||
) | ||
.run_test(&[HjSmj, NljHj], true) |
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.
.run_test(&[HjSmj, NljHj], true) | |
.run_test(&[HjSmj, NljHj], false) |
JoinType::RightSemi, | ||
Some(Box::new(col_lt_col_filter)), | ||
) | ||
.run_test(&[HjSmj, NljHj], true) |
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.
.run_test(&[HjSmj, NljHj], true) | |
.run_test(&[HjSmj, NljHj], false) |
@@ -508,6 +508,124 @@ select t1.* from t1 where not exists (select 1 from t2 where t2.a = t1.a and t1. | |||
---- | |||
|
|||
|
|||
# RIGHTSEMI join tests |
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.
Im not sure these tests makes a difference as RIGHT SEMI are not supported by SQL this type of join can be called by optimizer on physical executiion
@@ -732,7 +727,7 @@ struct JoinedRecordBatches { | |||
pub batches: Vec<RecordBatch>, | |||
/// Filter match mask for each row(matched/non-matched) | |||
pub filter_mask: BooleanBuilder, | |||
/// Row indices to glue together rows in `batches` and `filter_mask` | |||
/// Streamed row indices to glue together rows in `batches` and `filter_mask` |
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.
/// Streamed row indices to glue together rows in `batches` and `filter_mask` | |
/// Left row indices to glue together rows in `batches` and `filter_mask` |
Which issue does this PR close?
Closes #13471
Rationale for this change
Adds support for RightSemi join in SortMergeJoin
What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?