alamb commented on code in PR #8580:
URL: https://github.com/apache/arrow-rs/pull/8580#discussion_r2417932460


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -3084,6 +3084,32 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_cast_decimal32_to_decimal32_large_scale_reduction() {

Review Comment:
   I verified this test fails without the code in this PR:
   
   ```
   called `Result::unwrap()` on an `Err` value: ArithmeticOverflow("Overflow 
happened on: 10 ^ 10")
   thread 'cast::tests::test_cast_decimal32_to_decimal32_large_scale_reduction' 
panicked at arrow-cast/src/cast/mod.rs:3105:9:
   called `Result::unwrap()` on an `Err` value: ArithmeticOverflow("Overflow 
happened on: 10 ^ 10")
   stack backtrace:
   ```



##########
arrow-cast/src/cast/mod.rs:
##########
@@ -3106,6 +3132,37 @@ mod tests {
         );
     }
 
+    #[test]
+    fn test_cast_decimal64_to_decimal64_large_scale_reduction() {

Review Comment:
   i agree this seems adequate



##########
arrow-array/src/arithmetic.rs:
##########
@@ -288,7 +288,7 @@ native_type_op!(u8);
 native_type_op!(u16);
 native_type_op!(u32);
 native_type_op!(u64);
-native_type_op!(i256, i256::ZERO, i256::ONE, i256::MIN, i256::MAX);

Review Comment:
   I verified that this form of the macro simply re-calls the same macro with 
the same arguments 👍 



-- 
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]

Reply via email to