-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix right, full join handling when having multiple non-matching rows at the left side #845
Conversation
@@ -745,9 +747,12 @@ fn build_join_indexes( | |||
&keys_values, | |||
)? { | |||
left_indices.append_value(i)?; | |||
} else { | |||
left_indices.append_null()?; | |||
right_indices.append_value(row as u32)?; |
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.
This is the fix, instead of adding the (left=null, right) to every non-match, it does it only once at the end if there wasn't a single match.
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.
Talk about a speedy bugfix 🐎 ! I barely filed the ticket and there is a fix ready :)
One thing that might help readability would be to rename from double negative (no_match false) to has_match
or something
Nice work @Dandandan
Co-authored-by: Andrew Lamb <[email protected]>
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.
good catch 👍
Which issue does this PR close?
Closes #843
Rationale for this change
Right and hull join had an error where if they wouldn't match multiple left side values, for each value it didn't match it would add a row. This is triggered by the change to #842 which maps any value to a 0 hash. Normally values and null values have different hashes, so they wouldn't have this problem.
Instead the correct behavior is to add a single row if it doesn't match any.
What changes are included in this PR?
Are there any user-facing changes?