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

fix: Fix validation for inner and left join when join_nulls unflaged #19698

Merged
merged 6 commits into from
Nov 11, 2024

Conversation

barak1412
Copy link
Contributor

Fixes #19624.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Nov 8, 2024
@@ -44,6 +44,8 @@ pub(super) fn hash_join_tuples_inner<T, I>(
swapped: bool,
validate: JoinValidation,
join_nulls: bool,
// We should know the number of nulls to avoid extra calculation
build_null_count: usize,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure about adding this param, but I wanted to avoid performing another pass on all values to calculate it inside the function.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's worth it.

@@ -44,6 +44,8 @@ pub(super) fn hash_join_tuples_inner<T, I>(
swapped: bool,
validate: JoinValidation,
join_nulls: bool,
// We should know the number of nulls to avoid extra calculation
build_null_count: usize,
Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's worth it.

@ritchie46 ritchie46 merged commit 0b34f5f into pola-rs:main Nov 11, 2024
24 of 25 checks passed
@ritchie46
Copy link
Member

Thanks @barak1412. Looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Join cardinality validation shall not raise on multiple null values (that never produce matches)
2 participants