Repository navigation
Use fallible growth in MutableArrayData transforms - #11986
Closed
Rich-T-kid wants to merge 1 commit into
Closed
Rich-T-kid wants to merge 1 commit into
Rich-T-kid wants to merge 1 commit into
Conversation
Rich-T-kid
force-pushed
the
rich-T-kid/mutable-array-data-fallible-call-sites
branch
from
October 29, 2026 14:09
2c7c3f8 to
5d6bac8
Compare
Rich-T-kid
force-pushed
the
rich-t-kid/mutable-array-data-fallible-stack-base
branch
from
October 29, 2026 14:09
ba91f64 to
e1f9015
Compare
tsenart
pushed a commit
to perfloop-oss/arrow-rs
that referenced
this pull request
Nov 6, 2026
# Which issue does this PR address? Part of apache#11900. The fallible `MutableArrayData` extension work remains split into apache#11973 and apache#11986. # Rationale for this change Several `Result`-returning paths still used infallible `MutableBuffer` allocation or growth, so oversized outputs and allocation failures could panic instead of reaching the caller as an error. # What changes are included in this PR? Array construction, row decoding, selection and string kernels, and the Parquet fixed-size-list reader now use fallible allocation with checked size arithmetic. Once capacity has been reserved successfully, pre-sized hot loops keep their existing unchecked or infallible writes rather than repeating capacity checks for every value. `MutableArrayData` construction is made fallible here; its extension implementation and type-specific callers remain in the follow-up PRs. # Are these changes tested? The added tests cover overflow in buffer sizes, offsets, and `MutableArrayData` construction. # Are there any significant user-facing changes? Fallible APIs return allocation and overflow errors in cases that previously panicked. Existing infallible APIs keep their panic behavior.
Propagate allocation failures from transform-specific buffer growth and use the shared rollback transaction for nested extensions.
Rich-T-kid
force-pushed
the
rich-t-kid/mutable-array-data-fallible-stack-base
branch
from
November 6, 2026 04:17
e1f9015 to
e2861aa
Compare
Rich-T-kid
force-pushed
the
rich-T-kid/mutable-array-data-fallible-call-sites
branch
from
November 6, 2026 04:17
5d6bac8 to
aa6b0fa
Compare
Rich-T-kid
marked this pull request as ready for review
November 6, 2026 04:17
Rich-T-kid
marked this pull request as draft
November 6, 2026 04:19
Contributor
Author
|
Superseded by #11973. The still-relevant type-specific fallible growth was ported onto the current no-snapshot implementation in c493936373; the obsolete transaction-helper changes were intentionally dropped. |
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.
Which issue does this PR address?
Closes #11900. This is the final call-site layer after #11912 and #11973. It is stacked on #11973 and should be retargeted to
mainafter that PR merges.Rationale for this change
#11973 adds rollback support to
MutableArrayData, but the type-specific transforms still use infallible buffer growth and start their own nested transactions.What changes are included in this PR?
Use fallible buffer growth in the type-specific transforms and reuse the parent rollback transaction for nested child extensions.
Are these changes tested?
Existing
MutableArrayDataoverflow and rollback coverage passes, with an additional dense-union offset boundary test.Are there any user-facing changes?
No API changes. Together with #11912 and #11973, the existing fallible APIs return allocation and overflow errors from these paths instead of panicking.