Skip to content

GH-51262: [Ruby] Add ListArray values constructor - #51263

Open
emecii wants to merge 1 commit into
apache:mainfrom
emecii:gh-51262-list-array
Open

GH-51262: [Ruby] Add ListArray values constructor#51263
emecii wants to merge 1 commit into
apache:mainfrom
emecii:gh-51262-list-array

Conversation

@emecii

@emecii emecii commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

GH-50382 identified list arrays as a prerequisite for a consistent public typed-array builder API. This adds the separately requested list constructor.

What changes are included in this PR?

  • Add ArrowFormat::ListArray.new(type, values) while preserving the existing buffer-based constructor.
  • Build list validity, offsets, and the child array from nested Ruby values using the declared child type.
  • Cover empty lists, null lists, and null child values.

Are these changes tested?

Yes. The red-arrow-format suite passes locally (694 tests, 705 assertions).

Are there any user-facing changes?

Yes. Callers can construct an ArrowFormat::ListArray directly from a list type and nested Ruby values.

AI assistance

AI assistance drafted the implementation and tests. The final patch was reviewed against the existing typed constructors and low-level list array representation, and the focused and full package tests were run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant