thomasrebele commented on code in PR #4505:
URL: https://github.com/apache/calcite/pull/4505#discussion_r2486635258


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1140,9 +1037,23 @@ private RexNode simplifyIs(RexCall call, RexUnknownAs 
unknownAs) {
       switch (a.getKind()) {
       case LITERAL:
         return rexBuilder.makeLiteral(!((RexLiteral) a).isNull());
+      case DIVIDE: {
+        RexNode op0 = ((RexCall) a).getOperands().get(0);
+        RexNode op1 = ((RexCall) a).getOperands().get(1);
+        if (RexUtil.isNull(op0) || RexUtil.isNull(op1)) {
+          return rexBuilder.makeLiteral(false);
+        }

Review Comment:
   Indeed, my 2nd commit for this PR made the check superfluous. I'll remove it.



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