fix(arrow): release schema after conversion failure - #862
Open
WZhuo wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the Iceberg-to-Arrow schema conversion path so that when nanoarrow conversion fails after partially initializing an ArrowSchema, the output is released/cleared to avoid leaving callers with an apparently-live schema.
Changes:
- Ensure
ToArrowSchema(const Schema&, ArrowSchema*)releases the output schema when nanoarrow conversion returns an error. - Extend
arrow_testcoverage to validateArrowSchema::releaseis cleared on both unsupported-type validation failures and nanoarrow conversion failures (viafixed(0)).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/iceberg/schema_internal.cc |
Releases the output ArrowSchema on internal conversion failure to prevent partially-initialized outputs from escaping. |
src/iceberg/test/arrow_test.cc |
Adds regression coverage verifying ArrowSchema::release is null after conversion failures. |
WZhuo
force-pushed
the
fix-to-arrow-schema-resource-leak
branch
from
July 31, 2026 09:12
3b99c34 to
8a10338
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release partially initialized ArrowSchema output when internal Iceberg-to-Arrow conversion fails. Add coverage using fixed(0), which passes compatibility validation but is rejected by nanoarrow, and verify the output release callback is cleared. Tests: arrow_test.