fallintoplace opened a new pull request, #1324: URL: https://github.com/apache/arrow-go/pull/1324
**What** - Copy BinaryView headers and ListView sizes directly from `ArrayData` during concatenation. **Why** - Avoid one temporary `memory.Buffer` wrapper per input chunk. - Reduce allocations for fragmented view arrays. **Implementation** - Use the existing `concatFixedWidthBuffers` helper for BinaryView headers and ListView/LargeListView sizes. - Added a benchmark for 64, 1,024, and 8,192 chunks. - Existing concatenate tests cover sliced and nullable view arrays. Benchmark on an Apple M1 Pro: | Case | Runtime before -> after | Allocations before -> after | | --- | ---: | ---: | | BinaryView, 1,024 chunks | 1.02ms -> 0.93ms | 1,050 -> 25 | | BinaryView, 8,192 chunks | roughly flat | 8,227 -> 34 | | ListView, 8,192 chunks | 2.27ms -> 1.92ms | 26,477 -> 18,388 | | LargeListView, 8,192 chunks | 2.28ms -> 1.95ms | 26,124 -> 17,304 | Tests: - `go test ./arrow/array -count=1` - `go vet ./arrow/array` - `git diff --check` -- 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]
