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 check_not_null_constraints null detection #13033

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

findepi
Copy link
Member

@findepi findepi commented Oct 21, 2024

check_not_null_constraints (aka check_not_null_contraits) checked
for null using Array::null_count which does not return real null
count.

@github-actions github-actions bot added the physical-expr Physical Expressions label Oct 21, 2024
Comment on lines +889 to +894
if batch
.column(index)
.logical_nulls()
.map(|nulls| nulls.null_count())
.unwrap_or_default()
> 0
Copy link
Member Author

Choose a reason for hiding this comment

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

This could be simplified back if we had something like apache/arrow-rs#6608

`check_not_null_constraints` (aka `check_not_null_contraits`) checked
for null using `Array::null_count` which does not return real null
count.
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @findepi -- the code looks good to me. My only concern is the new dependency

Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @findepi

@alamb alamb merged commit 211e76e into apache:main Oct 23, 2024
24 checks passed
@alamb
Copy link
Contributor

alamb commented Oct 23, 2024

Thanks again @findepi

@findepi findepi deleted the findepi/check-constraint branch October 23, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants