andygrove commented on code in PR #4938:
URL: https://github.com/apache/datafusion-comet/pull/4938#discussion_r3596117081


##########
native/spark-expr/src/math_funcs/internal/decimal_rescale_check.rs:
##########
@@ -197,7 +197,13 @@ impl PhysicalExpr for DecimalRescaleCheckOverflow {
                         rescale_and_check(value, delta, scale_factor, bound, 
fail_on_error)
                     })?;
 
-                let result = if !fail_on_error {
+                let result = if !fail_on_error && 
result.values().contains(&i128::MAX) {

Review Comment:
   Fixed in 1fbb5eaf7: the comment now names `contains` as the short-circuiting 
call.



##########
native/spark-expr/src/math_funcs/internal/decimal_rescale_check.rs:
##########
@@ -343,6 +349,19 @@ mod tests {
         assert!(result.is_err());
     }
 
+    #[test]
+    fn test_overflow_with_nulls_legacy() {

Review Comment:
   Added `test_all_values_overflow_legacy` in 1fbb5eaf7: `vec![Some(10_000), 
Some(20_000), Some(30_000)]` into precision 4, asserting all three slots are 
null.



##########
native/spark-expr/src/math_funcs/internal/decimal_rescale_check.rs:
##########
@@ -343,6 +349,19 @@ mod tests {
         assert!(result.is_err());
     }
 
+    #[test]

Review Comment:
   Added `test_precision_boundary_legacy` in 1fbb5eaf7: `vec![Some(9999), 
Some(10_000)]` at scale 0 into precision 4, asserting slot 0 keeps 9999 and 
slot 1 is null.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to