You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/05/29 13:22:37 UTC

[GitHub] [calcite] libenchao commented on a diff in pull request #2821: [CALCITE-5169] 'xx < 1 OR xx > 1' cannot be simplified to 'xx <> 1'

libenchao commented on code in PR #2821:
URL: https://github.com/apache/calcite/pull/2821#discussion_r884270772


##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -1443,11 +1443,15 @@ private void checkExponentialCnf(int n) {
         "true");
 
     // "a = 1 or a <> 2" could (and should) be simplified to "a <> 2"
-    // but can't do that right now
     checkSimplifyFilter(
         or(eq(aRef, literal1),
             ne(aRef, literal2)),
-        "OR(=(?0.a, 1), <>(?0.a, 2))");
+        "<>(?0.a, 2)");
+
+    checkSimplifyFilter(

Review Comment:
   good idea. done.



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org