Jin Xing created CALCITE-3729:
---------------------------------

             Summary: Filters failed to be pushed down when it's identical to 
join condition.
                 Key: CALCITE-3729
                 URL: https://issues.apache.org/jira/browse/CALCITE-3729
             Project: Calcite
          Issue Type: Improvement
            Reporter: Jin Xing
            Assignee: Jin Xing


FilterJoinRule optimize below sql as
{code:java}
select * from sales.dept d inner join sales.emp e
on d.deptno = e.deptno and d.deptno > e.mgr
where d.deptno > e.mgr

LogicalProject(DEPTNO=[$0], NAME=[$1], EMPNO=[$2], ENAME=[$3], JOB=[$4], 
MGR=[$5], HIREDATE=[$6], SAL=[$7], COMM=[$8], DEPTNO0=[$9], SLACKER=[$10])
  LogicalFilter(condition=[>($0, $5)])
    LogicalJoin(condition=[AND(=($0, $9), >($0, $5))], joinType=[inner])
      LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
{code}
 

The outer Filter failed to be pushed down into Join and removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to