Skip to content

fix(arrow/array): validate list-view builder dimensions#1018

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/list-view-builder-dimensions
Open

fix(arrow/array): validate list-view builder dimensions#1018
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/list-view-builder-dimensions

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

ListViewBuilder.AppendValuesWithSizes can accept too few dimensions or ranges that do not fit within the child values. NewArray can then return an invalid ListView array that fails when read, sliced, or validated.

What changes are included in this PR?

  • Require enough offsets and sizes for every logical list.
  • Reject negative sizes, negative offsets for non-empty ranges, and ranges beyond the child array.
  • Apply the checks to both ListView and LargeListView builders while preserving valid extra offset capacity.

Are these changes tested?

Yes. The tests cover missing offsets, missing sizes, negative sizes, negative offsets, and ranges beyond the child values for both offset widths. The full arrow/array package, assertion build, compute packages, IPC package, and CSV package also pass.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 25, 2026 20:20
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.

1 participant