Skip to content

fix(arrow/scalar): release partial children after failed struct extraction - #1118

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-getscalar-cleanup
Open

fix(arrow/scalar): release partial children after failed struct extraction#1118
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-getscalar-cleanup

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

GetScalar can create children before a later Struct child fails conversion. Returning immediately leaves the children already created on the error path unreleased.

What changes are included in this PR?

Release partial children when extraction fails while preserving ownership for a successfully built struct scalar. The regression test uses a list child followed by an unsupported view child.

Are these changes tested?

  • go test ./arrow/scalar

Are there any user-facing changes?

No API changes. This corrects the reported behavior while preserving the existing ownership and compatibility contracts.

@fallintoplace fallintoplace changed the title fix(arrow/scalar): release partial struct extraction fix(arrow/scalar): release children after failed struct extraction Aug 5, 2026
@fallintoplace fallintoplace changed the title fix(arrow/scalar): release children after failed struct extraction fix(arrow/scalar): release partial children after failed struct extraction Aug 6, 2026
@fallintoplace
fallintoplace force-pushed the fix/scalar-getscalar-cleanup branch from 74cc0db to d36a051 Compare August 6, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants