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 12:49:23 UTC

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

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


##########
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:
   What about adding a clarifying comment as we have in other tests? I.e. `a < 1 or a > 1 could be simplified to a <> 1`



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