NobiGo commented on code in PR #4402:
URL: https://github.com/apache/calcite/pull/4402#discussion_r2135441899


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1385,10 +1391,34 @@ enum SafeRexVisitor implements RexVisitor<Boolean> {
     }
 
     @Override public Boolean visitCall(RexCall call) {
-      if (!safeOps.contains(call.getKind())) {
+      SqlKind sqlKind = call.getKind();
+      SqlOperator sqlOperator = call.getOperator();
+
+      switch (sqlKind) {
+      case DIVIDE:

Review Comment:
   For example: In `RexProgramTest#testSimplifySimpleArithmetic` the test 
`#checkSimplify(div(a, nullInt), "null:INTEGER")` will failed, throws exception:
   ```
   Expected: with toString() is "null:INTEGER"
        but: toString() was "/(?0.notNullInt1, 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]

Reply via email to