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

support NullArray un arith/boolean kernel #4566

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

smiklos
Copy link
Contributor

@smiklos smiklos commented Jul 24, 2023

Which issue does this PR close?

Closes #4565.

Rationale for this change

What changes are included in this PR?

Since NullArray has no nulls buffer, we need to handle that case for is_null and is_not_null to work correctly

Are there any user-facing changes?

Nope

Don't think so

Nope

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 24, 2023
None => BooleanBuffer::new_unset(input.len()),
// NullArray has no nulls buffer yet all values are null
None => {
if input.data_type().equals_datatype(&DataType::Null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

or should we check for input to be NullArray?

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Left some minor comments

None => BooleanBuffer::new_set(input.len()),
None => {
// NullArray has no nulls buffer yet all values are null
if input.data_type().equals_datatype(&DataType::Null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if input.data_type().equals_datatype(&DataType::Null) {
if input.data_type() == &DataType::Null {

Could also possibly be lifted into the match expression

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done (both)

@tustvold tustvold merged commit dfb6428 into apache:master Jul 25, 2023
14 checks passed
@tustvold
Copy link
Contributor

Thank you

xuchen-plus pushed a commit to lakesoul-io/arrow-rs that referenced this pull request Jul 27, 2023
* support NullArray un arith/boolean kernel

* prettify based on feedback
richox pushed a commit to richox/arrow-rs that referenced this pull request Aug 3, 2023
* support NullArray un arith/boolean kernel

* prettify based on feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arrow-arith is_null is buggy with NullArray
2 participants