Skip to content
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

[BUG] Fix anti-join on different column names #2477

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Conversation

Vince7778
Copy link
Contributor

Closes #2475.

A bit of a bandaid fix. The issue was, while selecting the join strategy, for checking whether sort-merge join works, the joined columns need to be primitive types. However, in the plan we only have access to the output schema (as far as I know, maybe we can extract it from the children?). In a semi- or anti-join, the right column does not end up in the output schema, so the primitive type check panicked while looking for it. This issue does not appear if the left column has the same name as the right.

My fix is that, since we only support SMJ for inner joins, I move the join type check before the primitive check. This will need to be fixed later if we support SMJ for anti-joins, so I added a comment.

@github-actions github-actions bot added the bug Something isn't working label Jul 4, 2024
@Vince7778 Vince7778 requested a review from samster25 July 4, 2024 00:40
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@674e500). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2477   +/-   ##
=======================================
  Coverage        ?   63.41%           
=======================================
  Files           ?      947           
  Lines           ?   106304           
  Branches        ?        0           
=======================================
  Hits            ?    67409           
  Misses          ?    38895           
  Partials        ?        0           
Files Coverage Δ
src/daft-plan/src/physical_planner/translate.rs 90.90% <100.00%> (ø)

Copy link
Member

@samster25 samster25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@Vince7778 Vince7778 merged commit 55fc032 into main Jul 8, 2024
45 checks passed
@Vince7778 Vince7778 deleted the conor/antijoin-lefton branch July 8, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Antijoin panics using left_on/right_on
2 participants