Skip to content

fix(arrow): fill absent (list/map/struct) columns with NULLs#2649

Open
jordepic wants to merge 1 commit into
apache:mainfrom
jordepic:fix/2618-absent-nested-null
Open

fix(arrow): fill absent (list/map/struct) columns with NULLs#2649
jordepic wants to merge 1 commit into
apache:mainfrom
jordepic:fix/2618-absent-nested-null

Conversation

@jordepic

Copy link
Copy Markdown

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.

…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
@jordepic jordepic force-pushed the fix/2618-absent-nested-null branch from 00e8b0a to 66d84e0 Compare June 14, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data files persisted without complex columns in the table schema hit "unexpected target column" on read

1 participant