hcrosse opened a new pull request, #1604: URL: https://github.com/apache/arrow-go/pull/1604
### Rationale for this change `Append` obtains each child of a list scalar through `GetScalar` without releasing it. Children that hold buffers, such as binary values and nested lists, keep their references even after the caller releases everything it owns. ### What changes are included in this PR? `Append` releases each child that implements `Releasable` after appending it, including when the append fails. ### Are these changes tested? `TestAppendListScalarReleasesChildren` covers `list<binary>` and `large_list<binary>`. `TestAppendListScalarReleasesChildrenOnError` covers failed appends. `TestAppendNestedSlicedListScalar` now uses a checked allocator. All three fail on `main` with 64 or 128 bytes still allocated and pass with this change. I ran `go test -race ./arrow/scalar/ ./arrow/compute/...` and `golangci-lint` 2.13.2 on `./arrow/scalar/...` with Go 1.26.10 on macOS arm64. Both passed. ### Are there any user-facing changes? Yes. `Append` and `AppendSlice` no longer keep the buffers of list scalar children allocated after the caller releases everything. There is no API change. Closes #1603 -- 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]
