replace MutableBuffer callsites with fallible methods - #10641
Open
Rich-T-kid wants to merge 3 commits into
Open
Conversation
Rich-T-kid
commented
Aug 11, 2026
| predicate: BooleanBuffer, | ||
| value: &[u8], | ||
| ) -> (Buffer, OffsetBuffer<T::Offset>, Option<NullBuffer>) { | ||
| ) -> Result<(Buffer, OffsetBuffer<T::Offset>, Option<NullBuffer>), ArrowError> { |
Contributor
Author
There was a problem hiding this comment.
return type uses T::Offset which is a generic associated type, making a standalone type alias impossible;
adding a clippy suppress here
Jefffrey
reviewed
Aug 12, 2026
| buffer.reserve(capacity); | ||
| buffer | ||
| .try_reserve(capacity) | ||
| .map_err(|e| ArrowError::MemoryError(e.to_string()))?; |
Contributor
There was a problem hiding this comment.
is it worth having a into/from implementation so ? can handle this for us? since im seeing it a lot in this diff
Contributor
Author
There was a problem hiding this comment.
This will require adding a depency link between arrow-buffer or arrow-schema to implement
Contributor
There was a problem hiding this comment.
oh thats a bugger 🤔
maybe better off without this then, to avoid this dependency just for this
Contributor
Author
There was a problem hiding this comment.
makes sense, reverted it
Rich-T-kid
force-pushed
the
rich-t-kid/apply-falible-buffer-methods
branch
2 times, most recently
from
August 13, 2026 03:36
c90254b to
b3a525d
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.
Which issue does this PR close?
Rationale for this change
it is better to return an error and let down stream users decide how to proceed than to panic.
What changes are included in this PR?
updates all call sites in the project to use the fallible alternative to
mutableBuffermethods.Are these changes tested?
n/a behavior hasn't changed
Are there any user-facing changes?
no public methods we changed in this PR