hsyuan commented on a change in pull request #1256: [CALCITE-3101] Don't push 
non-equi join conditions into Project below Join
URL: https://github.com/apache/calcite/pull/1256#discussion_r311187346
 
 

 ##########
 File path: core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
 ##########
 @@ -466,6 +466,28 @@ LogicalProject(EXPR$0=[1])
     LogicalJoin(condition=[true], joinType=[inner])
       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
       LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testNotPushExpression">
+        <Resource name="sql">
+            <![CDATA[select 1 from emp inner join dept
+            on emp.deptno=dept.deptno and emp.ename is not null]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalProject(EXPR$0=[1])
+  LogicalJoin(condition=[AND(=($7, $9), IS NOT NULL($1))], joinType=[inner])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+    LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
 
 Review comment:
   See the problem described in the issue. The current implementation is not 
pushing down condition, it is just add a new Project node.

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