Skip to content

arrow-buffer: implement Saturating, Checked num-traits for i256#10088

Open
theirix wants to merge 2 commits into
apache:mainfrom
theirix:saturating-muladd
Open

arrow-buffer: implement Saturating, Checked num-traits for i256#10088
theirix wants to merge 2 commits into
apache:mainfrom
theirix:saturating-muladd

Conversation

@theirix

@theirix theirix commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Following up on #9417, there are a few missing numeric traits for i256 from num-traits:

Most likely, it brings us to the most conformant state, since https://docs.rs/num-traits/latest/num_traits/int/trait.PrimInt.html cannot be implemented because of NumCast trait - it is not compatible with arrow-buffer's std::convert::From trait implementations (they return Self, not Option<Self>)

What changes are included in this PR?

Traits:

  • SaturatingAdd, SaturatingSub, SaturatingMul
  • CheckedShl, CheckedShr
  • Not
  • ConstOne, ConstZero

Are these changes tested?

Existing and new unit tests

Are there any user-facing changes?

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jun 6, 2026
@theirix theirix marked this pull request as ready for review June 6, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

arrow-buffer: implement Saturating, CheckedShl, Not num-traits for i256

1 participant