Diveyam-Mishra commented on code in PR #5048:
URL: https://github.com/apache/calcite/pull/5048#discussion_r3608396988


##########
file/src/test/java/org/apache/calcite/adapter/file/FileAdapterTest.java:
##########
@@ -438,6 +602,53 @@ private static void checkEmpty(ResultSet resultSet) {
         .ok();
   }
 
+  @Test void testFilterPushDownOr() {
+    sql("smart", "select name from EMPS where deptno = 20 or empno = 100")
+        .returns("NAME=Fred", "NAME=Eric", "NAME=Wilma")
+        .ok();
+  }
+

Review Comment:
   The filter is pushed into CsvTableScan by CsvProjectFilterTableScanRule. 
During CsvTableScan.implement(), the scan compiles its stored condition into an 
EnumerableCalc over a condition-less scan, which is why the generated plan 
displays $condition in the calc. The predicate is still owned by the scan 
before implementation and is evaluated once through the generated calc code. 
    I mentioned the same in the above resolved comments 
   



-- 
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: [email protected]

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

Reply via email to