-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix bug: right semi join can't support the filter #4327
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
Conversation
| let stream = join.execute(0, task_ctx)?; | ||
| let batches = common::collect(stream).await?; | ||
|
|
||
| let expected = vec![ |
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.
If don't fix this bug, the result will be
[
"+----+----+----+",
"| a1 | b1 | c1 |",
"+----+----+----+",
"+----+----+----+",
]
64fa5dc to
3f95e42
Compare
3f95e42 to
d884bb5
Compare
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn join_left_semi_with_filter() -> Result<()> { |
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.
add test cases to ensure left semi with filter is correct.
|
This bug is caused by this commit d6f0b12#r90728800 |
| &keys_values, | ||
| *null_equals_null, | ||
| )? { | ||
| left_indices.append(i); |
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.
Ah good find. I missed the case where this would be used.
Thanks for adding the unit test!
alamb
left a comment
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 @liukun4515 and @Dandandan
| Column::new_with_schema("b1", &right.schema())?, | ||
| )]; | ||
|
|
||
| // build filter right.b2 > 4 |
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.
Ah, the key is this filter. 👍
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.
Ah, the key is this filter. 👍
Yes, we can add filter to filter left row or right row, and get the new result.
|
Benchmark runs are scheduled for baseline = 94cd982 and contender = 92325bf. 92325bf is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
After I go through the code of |
|
find a new bug for the for example with sql In the current code, we will get the empty result because of break in the |
|
Yes, it is a bug indeed. |
Which issue does this PR close?
part of #4247
right semijoin with filter and add test case for this bugleft semijoin with filterTODO in the next PR: fix the
right antijoin with filter; Meet some issue about the codebase, will file a new PR to fix that.@alamb @Dandandan
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?