Skip to content

fix(parquet): fix CDC panic on nested ListArrays with null entries #9644

Open
kszucs wants to merge 1 commit intoapache:mainfrom
kszucs:cdc-nested-null
Open

fix(parquet): fix CDC panic on nested ListArrays with null entries #9644
kszucs wants to merge 1 commit intoapache:mainfrom
kszucs:cdc-nested-null

Conversation

@kszucs
Copy link
Copy Markdown
Member

@kszucs kszucs commented Apr 1, 2026

The CDC chunker's value_offset diverged from actual leaf array positions when null list entries had non-empty child offset ranges (valid per the Arrow columnar format spec). This caused slice_for_chunk to produce incorrect non_null_indices, leading to an out-of-bounds panic in write_mini_batch.

Track non-null value counts (nni) separately from leaf slot counts in the chunker, and use them in slice_for_chunk to correctly index into non_null_indices regardless of gaps in the leaf array.

Which issue does this PR close?

Closes #9637

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

…pache#9637)

The CDC chunker's value_offset diverged from actual leaf array positions
when null list entries had non-empty child offset ranges (valid per the
Arrow columnar format spec). This caused slice_for_chunk to produce
incorrect non_null_indices, leading to an out-of-bounds panic in
write_mini_batch.

Track non-null value counts (nni) separately from leaf slot counts in
the chunker, and use them in slice_for_chunk to correctly index into
non_null_indices regardless of gaps in the leaf array.
@github-actions github-actions bot added the parquet Changes to the parquet crate label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Parquet] ArrowWriter with CDC panics on nested ListArrays

1 participant