Skip to content

[57_maintenance] Fix sliced sparse union ArrayData conversion - #11812

Merged
alamb merged 1 commit into
apache:57_maintenancefrom
Jefffrey:backport_11649_57
Oct 22, 2026
Merged

alamb merged 1 commit into
apache:57_maintenancefrom
Jefffrey:backport_11649_57

Conversation

@Jefffrey

Copy link
Copy Markdown
Contributor

- Closes apache#11582

Converting sliced sparse union `ArrayData` into an array currently reads
values outside the slice. A single-child union can also return a logical
null mask longer than the resulting array.

Apply the parent offset and length to sparse child data before
constructing the child arrays. Dense children retain their existing
offsets and lengths.

Regression tests compare conversion from sliced `ArrayData` with direct
union slicing, including nonzero offsets, truncation at offset zero,
empty slices, custom type IDs, nullable values, and a dense-union
control.

AI assistance was used to analyze the conversion path and draft the
code, regression tests, and this description.

No public API changes.
@Jefffrey Jefffrey added the bug Squash those bugs label Oct 22, 2026
@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 22, 2026
@Jefffrey
Jefffrey marked this pull request as ready for review October 22, 2026 12:24
@alamb
alamb merged commit 8fd4fdb into apache:57_maintenance Oct 22, 2026
26 checks passed
@Jefffrey
Jefffrey deleted the backport_11649_57 branch October 22, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow-core Core crates related to representing arrow data bug Squash those bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants