-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate decimal256 with i256 directly #3025
Conversation
arrow-buffer/src/bigint.rs
Outdated
@@ -87,6 +87,15 @@ impl i256 { | |||
} | |||
} | |||
|
|||
/// Create an integer value from its representation as high and low byte arrays in little-endian. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just use the from_le_bytes above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally wanted that. But I cannot make from_le_bytes
as const fn.
error[E0015]: cannot call non-const fn `Result::<[u8; 16], TryFromSliceError>::unwrap` in constant functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it 👍
FYI @liukun4515
Benchmark runs are scheduled for baseline = 53b7f64 and contender = 488eff0. 488eff0 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Thanks @tustvold |
Which issue does this PR close?
Closes #3024.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?