vertexclique commented on a change in pull request #8685:
URL: https://github.com/apache/arrow/pull/8685#discussion_r525066900
##########
File path: rust/arrow/src/datatypes.rs
##########
@@ -771,6 +784,21 @@ macro_rules! make_numeric_type {
fn write(simd_result: Self::Simd, slice: &mut [Self::Native]) {
unsafe { simd_result.write_to_slice_unaligned_unchecked(slice)
};
}
+
+ #[inline]
+ fn mask_and(left: Self::SimdMask, right: Self::SimdMask) ->
Self::SimdMask {
+ left & right
+ }
+
+ #[inline]
+ fn identity_for_min_op() -> Self::Native {
+ $max_value
+ }
+
+ #[inline]
+ fn identity_for_max_op() -> Self::Native {
+ $min_value
+ }
Review comment:
> Or do you mean there is an existing trait function in num::num that
provides those constants for all numeric types?
yes: https://docs.rs/num/0.3.1/num/trait.Bounded.html
That will be useful in many places where we manually figuring out bounds.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]