Skip to content

Use fallible growth in MutableArrayData transforms - #11986

Closed
Rich-T-kid wants to merge 1 commit into
apache:rich-t-kid/mutable-array-data-fallible-stack-basefrom
Rich-T-kid:rich-T-kid/mutable-array-data-fallible-call-sites
Closed

Rich-T-kid wants to merge 1 commit into
apache:rich-t-kid/mutable-array-data-fallible-stack-basefrom
Rich-T-kid:rich-T-kid/mutable-array-data-fallible-call-sites

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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 main after 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 MutableArrayData overflow 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.

@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 29, 2026
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/mutable-array-data-fallible-call-sites branch from 2c7c3f8 to 5d6bac8 Compare October 29, 2026 14:09
@Rich-T-kid
Rich-T-kid force-pushed the rich-t-kid/mutable-array-data-fallible-stack-base branch from ba91f64 to e1f9015 Compare October 29, 2026 14:09
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
Rich-T-kid force-pushed the rich-t-kid/mutable-array-data-fallible-stack-base branch from e1f9015 to e2861aa Compare November 6, 2026 04:17
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/mutable-array-data-fallible-call-sites branch from 5d6bac8 to aa6b0fa Compare November 6, 2026 04:17
@Rich-T-kid
Rich-T-kid marked this pull request as ready for review November 6, 2026 04:17
@Rich-T-kid
Rich-T-kid marked this pull request as draft November 6, 2026 04:19
@Rich-T-kid

Copy link
Copy Markdown
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.

@Rich-T-kid Rich-T-kid closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow-core Core crates related to representing arrow data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant