Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3729

Filters failed to be pushed down when it's identical to join condition.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.0
    • None

    Description

      FilterJoinRule optimize below sql as

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

       

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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jinxing6042@126.com Jin Xing
            jinxing6042@126.com Jin Xing
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m

                Slack

                  Issue deployment