ihuzenko commented on a change in pull request #1610: [CALCITE-3525] 
RexSimplify: eliminate redundant rex calls in OR
URL: https://github.com/apache/calcite/pull/1610#discussion_r353726088
 
 

 ##########
 File path: 
mongodb/src/test/java/org/apache/calcite/adapter/mongodb/MongoAdapterTest.java
 ##########
 @@ -286,7 +286,7 @@ private static void populate(MongoCollection<Document> 
collection, URL resource)
   @Test public void testFilterRedundant() {
     assertModel(MODEL)
         .query(
-            "select * from zips where state > 'CA' and state < 'AZ' and state 
= 'OK'")
+            "select * from zips where state > 'CA' and state < 'PZ' and state 
= 'OK'")
 
 Review comment:
   Yes, with my changes in ```RexSimplify``` this compound condition became 
available for simplification and since `OK` is not between `CA` and `AZ` whole 
condition was simplified to `false` . To preserve expected result as is I 
extended the range to include `OK` in it. 

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


With regards,
Apache Git Services

Reply via email to