vlsi commented on a change in pull request #2357:
URL: https://github.com/apache/calcite/pull/2357#discussion_r585298599



##########
File path: core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
##########
@@ -931,15 +931,17 @@ private void checkExponentialCnf(int n) {
     checkSimplify(rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_NULL, aRef),
         "true");
 
-    // condition, and the inverse - nothing to do due to null values
-    checkSimplify2(and(le(hRef, literal(1)), gt(hRef, literal(1))),
-        "AND(<=(?0.h, 1), >(?0.h, 1))",
+    // condition, and the inverse
+    checkSimplify3(and(le(hRef, literal(1)), gt(hRef, literal(1))),
+        "<>(?0.h, ?0.h)",
+        "false",
         "false");

Review comment:
       It looks like the intention in the test was related to `null` somehow, 
however, `hRef` is `INTEGER NOT NULL`, so this expression is always `false`.
   
   I thought Sarg was supposed to handle `x<>x` for non-nullable `x` and 
transform it to `true`




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to