getChan commented on code in PR #23809:
URL: https://github.com/apache/datafusion/pull/23809#discussion_r3649783117


##########
datafusion/physical-expr/src/expressions/cast.rs:
##########
@@ -179,11 +179,8 @@ impl CastExpr {
                 | (UInt8, UInt16 | UInt32 | UInt64)
                 | (UInt16, UInt32 | UInt64)
                 | (UInt32, UInt64)

Review Comment:
   I don't think so. Signed-to-unsigned casts (e.g. `Int8 -> UInt16`) convert 
negative numbers to large positive values (or error out), breaking order 
preservation (e.g. `-1 < 5` becomes `65535 > 5`).
                                                            
   So these should stay excluded. I've added unit tests  for this as well.



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