kosiew commented on code in PR #25234:
URL: https://github.com/apache/datafusion/pull/25234#discussion_r4011884794


##########
datafusion/expr-common/src/interval_arithmetic.rs:
##########
@@ -2358,6 +2382,85 @@ mod tests {
         Ok(())
     }
 
+    #[test]
+    fn test_widening_integer_cast_bounds() {
+        use DataType::{Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, 
UInt64};
+        use arrow::compute::CastOptions;
+
+        let types = [

Review Comment:
   Nice coverage here. One additional test that might be useful is exercising 
this through a mixed signed/unsigned coercion path, since `coerce_operands` and 
`coerce_for_comparison` also invoke this cast when unifying operand types. For 
example, we could check that an unbounded `UInt8` is coerced to the bounded 
`0..255` range before a widening operation with `Int16`, perhaps through 
`mul`/`div` or `contains`/`intersect`. Not a blocker since the direct cast 
matrix already covers the underlying behavior.



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