skyon0522-ai opened a new pull request, #1385: URL: https://github.com/apache/arrow-go/pull/1385
### Rationale for this change Writing a middle slice of a List or LargeList containing dense unions fails even when the input passes `ValidateFull()`. The stream writer returns an index-out-of-range error, and the file writer panics. `RawTypeCodes()` includes the backing buffer's remaining entries, while the rebased output buffer holds only the logical slice length. ### What changes are included in this PR? Limit the type codes visited during dense union rebasing to `arr.Len()`. Add an IPC roundtrip regression following the existing list-slice example and checked-allocator tests. ### Are these changes tested? On Linux amd64 with Go 1.27.2, against base `5c175a9a91ee16489849dcab4687de7a27724dac`: - The new regression fails before the production change for dense-union middle slices in both List and LargeList, over File and Stream transports. - After the change, all 24 regression combinations pass: List/LargeList, dense/sparse unions, full/middle/empty slices, and File/Stream. Inputs use custom type codes and include a selected null child. - `go test ./arrow/ipc -count=1` passes. - `go vet ./arrow/ipc` passes. ### Are there any user-facing changes? Valid middle slices containing dense unions can be written and read back through IPC. No public API changes. AI assistance: Codex generated the patch, regression test, and this description, and ran the recorded checks. -- 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]
