Repository navigation
Conversation
A required fixed-size list inside a nullable struct read back as a list with no nulls of its own whose required items held nulls under the null structs. That array fails FixedSizeListArray's own validation, so take, concat and interleave over the column return an error (and interleave panicked in arrow 59). When an ancestor is null for some rows, build the list's validity bitmap even though the list itself is required. The null items are then masked by the list, and the list's nulls by the ancestor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
A required
FixedSizeListinside a nullable struct reads back from Parquet as an array that fails its own validation: the list has no nulls, but its required items are null in the rows where the struct is null.take,concatandinterleaveover the column then return "Found unmasked nulls for non-nullable FixedSizeListArray field", so a sort or merge over a table with this shape fails.What changes are included in this PR?
FixedSizeListArrayReader::consume_batchalready insertsfixed_sizenull items for each row whose definition level shows an ancestor is null. It now also builds the list's validity bitmap when that happens, even though the list itself is required. The null items are then masked by the list, and the list's nulls by the ancestor, whichStructArrayallows for a non-nullable child.Nothing changes for nullable lists, or for required lists with no null ancestor.
Are these changes tested?
Yes:
test_required_list_under_nullable_structwrites[{l: [1, 2]}, null, null], reads it back, validates the column and the list, and runstake,concatandinterleaveover it. It fails without the change.Are there any significant user-facing changes?
A required fixed-size list under a null ancestor now reads with nulls in those rows instead of an invalid array.
AI usage disclosure
Yes-- AI has been assisting us with migrating away from an older system / different rust library, to datafusion. Running our old test suite against arrow-rs and datafusion, this is one of the issues our tests found.