mihaibudiu commented on code in PR #5228:
URL: https://github.com/apache/calcite/pull/5228#discussion_r3882225879


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1614,16 +1635,23 @@ private boolean isSafe(RexCall call, boolean deep) {
       SqlKind sqlKind = call.getKind();
       SqlOperator sqlOperator = call.getOperator();
 
-      if (SqlKind.CHECKED_ARITHMETIC.contains(sqlKind)) {
-        // Checked arithmetic throws on overflow, so it is only safe when the
-        // arithmetic is never performed, i.e. when an operand is NULL.
+      if (SqlKind.CHECKED_ARITHMETIC.contains(sqlKind)

Review Comment:
   The API should take a RexCall which can access types.



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