[ https://issues.apache.org/jira/browse/CALCITE-3729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17028284#comment-17028284 ]
Jin Xing commented on CALCITE-3729: ----------------------------------- Thanks a lot for merging [~vladimirsitnikov] ! > 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 > Priority: Major > Labels: pull-request-available > Fix For: 1.22.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > 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)