emecii opened a new pull request, #51274: URL: https://github.com/apache/arrow/pull/51274
### Rationale for this change GH-50382 requests explicit value constructors for all existing `ArrowFormat::Type` subclasses before the broader builder API is exposed. Fixed-size lists still require callers to manually construct the parent validity buffer and flattened child array. This is the focused fixed-size-list prerequisite requested in the GH-50382 maintainer discussion. It is distinct from variable-size `ListArray` support in GH-51262. ### What changes are included in this PR? - Add `ArrowFormat::FixedSizeListArray.new(type, values)` while preserving the existing low-level four-argument constructor. - Build the parent validity bitmap and the child array from nested Ruby values. - Preserve exactly `type.size` child slots for null parent lists. - Reject non-null lists whose size differs from the declared fixed size. - Delegate child construction to the declared child field type. - Add focused coverage for typed construction, parent and child nulls, invalid sizes, empty input, and the low-level constructor. ### Are these changes tested? Yes. ```console RUBYLIB=/opt/homebrew/lib/ruby/gems/4.0.0/gems/red-arrow-25.0.1/lib GI_TYPELIB_PATH=/opt/homebrew/lib/girepository-1.0 bundle exec ruby test/run.rb test-fixed-size-list-array.rb # 6 tests, 12 assertions, 0 failures, 0 errors RUBYLIB=/opt/homebrew/lib/ruby/gems/4.0.0/gems/red-arrow-25.0.1/lib GI_TYPELIB_PATH=/opt/homebrew/lib/girepository-1.0 bundle exec rake test # 696 tests, 704 assertions, 0 failures, 0 errors ``` I also wrote an Arrow IPC file containing `[[1, 2], nil, [3, nil]]` with the new constructor and loaded it with the native Arrow reader; the values round-tripped unchanged. The tests use the current `red-arrow-format` sources with the locally installed Arrow 25.0.1 native extension. Upstream CI remains authoritative for the matching main-branch native runtime. ### Are there any user-facing changes? Yes. `ArrowFormat::FixedSizeListArray` gains a two-argument values constructor. The existing low-level constructor remains supported. ### AI assistance disclosure OpenAI Codex assisted with issue research, implementation, test generation, validation commands, and drafting this pull request. The submitted behavior is supported by the focused regression, full package suite, and IPC round-trip results above. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
