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


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1142,6 +1151,9 @@ private RexNode simplifyIs(RexCall call, RexUnknownAs 
unknownAs) {
     // "(CASE WHEN FALSE THEN 1 ELSE 2) IS NOT NULL" we first simplify the
     // argument to "2", and only then we can simplify "2 IS NOT NULL" to 
"TRUE".
     a = simplify(a, UNKNOWN);
+    if (!isSafeExpression(a)) {
+      return rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_NULL, a);
+    }

Review Comment:
   I've reverted all the changes and moved the `if(!isSafeExpression(a))` down.



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