alamb commented on code in PR #4465:
URL: https://github.com/apache/arrow-rs/pull/4465#discussion_r1254428516
##########
arrow-arith/src/arithmetic.rs:
##########
@@ -335,279 +298,56 @@ where
///
/// This doesn't detect overflow. Once overflowing, the result will wrap
around.
/// For an overflow-checking variant, use `add_checked` instead.
+#[deprecated(note = "Use arrow_arith::numeric::add_wrapping")]
pub fn add<T: ArrowNumericType>(
left: &PrimitiveArray<T>,
right: &PrimitiveArray<T>,
) -> Result<PrimitiveArray<T>, ArrowError> {
- math_op(left, right, |a, b| a.add_wrapping(b))
+ binary(left, right, |a, b| a.add_wrapping(b))
}
/// Perform `left + right` operation on two arrays. If either left or right
value is null
/// then the result is also null.
///
/// This detects overflow and returns an `Err` for that. For an
non-overflow-checking variant,
/// use `add` instead.
+#[deprecated(note = "Use arrow_arith::numeric::add")]
pub fn add_checked<T: ArrowNumericType>(
left: &PrimitiveArray<T>,
right: &PrimitiveArray<T>,
) -> Result<PrimitiveArray<T>, ArrowError> {
- math_checked_op(left, right, |a, b| a.add_checked(b))
+ try_binary(left, right, |a, b| a.add_checked(b))
Review Comment:
But aren't the tests in terms of the original kernels? If you don't call
into the new kernels they aren't tested.
Or perhaps I am missing something
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]