You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/01/13 10:37:00 UTC

[jira] [Resolved] (CALCITE-3729) Filters failed to be pushed down when it's identical to join condition.

     [ https://issues.apache.org/jira/browse/CALCITE-3729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Sitnikov resolved CALCITE-3729.
----------------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Merged in https://github.com/apache/calcite/commit/dfd8da61aad1de003200b3d407dd5b7ac222ba39

> 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: 0.5h
>  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)