Skip to content

Conversation

@phillipleblanc
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

Fixes the validation logic in StructArray::try_new to not error if there aren't any unmasked nulls, but a.logical_nulls() returns Some

What changes are included in this PR?

A single line change to check for null_count() on the NullBuffer before comparing against the parent nulls.

Are there any user-facing changes?

No

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 @phillipleblanc -- this PR looks good to me

As I am trying to prepare for a release tomorrow, could you possibly look at the suggestions? I think they are both worth doing prior to merge. Sorry for the delay in reviewing

@phillipleblanc
Copy link
Contributor Author

Thanks for taking a look @alamb - this is ready for another review.

@phillipleblanc
Copy link
Contributor Author

phillipleblanc commented May 9, 2025

Hmm, I'm not sure why the integration test failed - I'll try re-running?

@alamb alamb merged commit 188a141 into apache:main May 9, 2025
26 checks passed
@alamb
Copy link
Contributor

alamb commented May 9, 2025

Thanks @phillipleblanc

@rluvaton
Copy link
Member

Just faced this, thank you for fixing

@phillipleblanc phillipleblanc deleted the phillip/250423-upstream-struct-array-validation-fix branch May 15, 2025 15:36
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.

StructArray::try_new validation incorrectly returns an error when logical_nulls() returns Some() && null_count == 0

3 participants