diff --git a/arrow-arith/src/numeric.rs b/arrow-arith/src/numeric.rs index 17b794762b9..91aaf628438 100644 --- a/arrow-arith/src/numeric.rs +++ b/arrow-arith/src/numeric.rs @@ -888,15 +888,15 @@ mod tests { test_neg_primitive::( &[i32::MIN], - Err("Compute error: Overflow happened on: -2147483648"), + Err("Compute error: Overflow happened on: - -2147483648"), ); test_neg_primitive::( &[i64::MIN], - Err("Compute error: Overflow happened on: -9223372036854775808"), + Err("Compute error: Overflow happened on: - -9223372036854775808"), ); test_neg_primitive::( &[i64::MIN], - Err("Compute error: Overflow happened on: -9223372036854775808"), + Err("Compute error: Overflow happened on: - -9223372036854775808"), ); let r = neg_wrapping(&Int32Array::from(vec![i32::MIN])).unwrap(); @@ -911,7 +911,7 @@ mod tests { assert_eq!( err, - "Compute error: Overflow happened on: -9223372036854775808" + "Compute error: Overflow happened on: - -9223372036854775808" ); let a = Decimal128Array::from(vec![1, 3, -44, 2, 4]) diff --git a/arrow-array/src/arithmetic.rs b/arrow-array/src/arithmetic.rs index 72989ad7d5e..078c2e3bc40 100644 --- a/arrow-array/src/arithmetic.rs +++ b/arrow-array/src/arithmetic.rs @@ -237,7 +237,7 @@ macro_rules! native_type_op { #[inline] fn neg_checked(self) -> Result { self.checked_neg().ok_or_else(|| { - ArrowError::ComputeError(format!("Overflow happened on: {:?}", self)) + ArrowError::ComputeError(format!("Overflow happened on: - {:?}", self)) }) }