leonardBang commented on a change in pull request #1491: [CALCITE-3368] Some 
problems simplifying ‘expression IS NULL’ 
URL: https://github.com/apache/calcite/pull/1491#discussion_r333891672
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/RexProgramTest.java
 ##########
 @@ -1266,21 +1268,53 @@ private void checkExponentialCnf(int n) {
 
     // "null is null" to "true"
     checkSimplify(isNull(nullBool), "true");
-    // "(x + y) is null" simplifies to "x is null or y is null"
-    checkSimplify(isNull(plus(vInt(0), vInt(1))),
-        "OR(IS NULL(?0.int0), IS NULL(?0.int1))");
-    checkSimplify(isNull(plus(vInt(0), vIntNotNull(1))), "IS NULL(?0.int0)");
-    checkSimplify(isNull(plus(vIntNotNull(0), vIntNotNull(1))), "false");
-    checkSimplify(isNull(plus(vIntNotNull(0), vInt(1))), "IS NULL(?0.int1)");
-
-    // "(x + y) is not null" simplifies to "x is not null and y is not null"
-    checkSimplify(isNotNull(plus(vInt(0), vInt(1))),
-        "AND(IS NOT NULL(?0.int0), IS NOT NULL(?0.int1))");
-    checkSimplify(isNotNull(plus(vInt(0), vIntNotNull(1))),
-        "IS NOT NULL(?0.int0)");
-    checkSimplify(isNotNull(plus(vIntNotNull(0), vIntNotNull(1))), "true");
-    checkSimplify(isNotNull(plus(vIntNotNull(0), vInt(1))),
-        "IS NOT NULL(?0.int1)");
+  }
+
+
+  @Test public void testUnsafeSimplify() {
 
 Review comment:
    I agree with you that these tests  should reduce.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to