fix(arrow/scalar): release partial children after failed struct conversion - #1114
Conversation
e8fa649 to
3fc83c1
Compare
|
@fallintoplace Heads-up: #1106 has just been merged into Nothing is wrong with this PR — it is still approved. It just needs a rebase onto the latest Apologies for the extra round-trip: the conflict is a side effect of the sibling fix landing first, not anything you did. Note: This comment was drafted by an AI-assisted triage tool run by a maintainer, and may contain mistakes. Once you have addressed the points above, an Apache Arrow Go maintainer — a real person — will take the next look at your PR. If anything here looks wrong, say so on the PR and a maintainer will follow up. See CONTRIBUTING.md for the project's contribution conventions. |
4db44ef to
b159ff5
Compare
Rationale for this change
ToScalar creates child scalars incrementally. If a later Struct field fails, earlier array-backed children can remain retained after the conversion returns an error.
What changes are included in this PR?
Release partial children on failure while keeping the existing ownership transfer for a completed struct scalar. Add checked-allocator coverage for the failed conversion.
Are these changes tested?
go test ./arrow/scalarAre there any user-facing changes?
No API changes. This corrects the reported behavior while preserving the existing ownership and compatibility contracts.