fix(arrow): fill absent (list/map/struct) columns with NULLs#2649
Open
jordepic wants to merge 1 commit into
Open
fix(arrow): fill absent (list/map/struct) columns with NULLs#2649jordepic wants to merge 1 commit into
jordepic wants to merge 1 commit into
Conversation
…ULLs When a column of List/LargeList/Map/FixedSizeList is absent from a data file (schema evolution added it later, no initial-default), the missing-column NULL-fill causes: 'unexpected target column type List(...)'. Emit an all-NULL array of exactly the target nested type via new_null_array (preserves nested Field defs + field-id metadata). Matches iceberg-java BaseParquetReaders.defaultReader: absent + optional -> ParquetValueReaders.nulls() (NULL per row, never an empty collection). Closes apache#2618
00e8b0a to
66d84e0
Compare
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.
What changes are included in this PR?
When a nested column of List/LargeList/Map/FixedSizeList is absent from a data file (schema evolution added it later, no initial-default), the missing-column NULL-fill causes: 'unexpected target column type List(...)'.
Emit NULL matching the target type (follows what iceberg-java does).
Are these changes tested?
Yes - we run local unit tests with lists and maps to confirm that if omitted from a data file but present in the table schema we'll properly return them with NULL fills.