Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.1-incubating
    • Component/s: None
    • Labels:
      None

      Description

      For e.g. for the following query:

      select s.deptno from (select * from dept where exists (
        select * from emp
        where emp.deptno = dept.deptno
        and emp.sal > 100)) s join customer.account on s.deptno = account.acctno
      

      Projection of DeptNo should get pushed below SemiJoin

      ProjectRel(DEPTNO=[$0])
        JoinRel(condition=[=($0, $1)], joinType=[inner])
          SemiJoinRel(condition=[=($0, $1)], joinType=[inner])
            ProjectRel(DEPTNO=[$0])
              TableAccessRel(table=[[CATALOG, SALES, DEPT]])
            ProjectRel($f01=[$2])
              JoinRel(condition=[=($1, $2)], joinType=[inner])
                FilterRel(condition=[>($0, 100)])
                  ProjectRel(SAL=[$5], DEPTNO=[$7])
                    TableAccessRel(table=[[CATALOG, SALES, EMP]])
                AggregateRel(group=[{0}])
                  ProjectRel($f0=[$0])
                    ProjectRel(DEPTNO=[$0])
                      TableAccessRel(table=[[CATALOG, SALES, DEPT]])
          ProjectRel(ACCTNO=[$0])
            TableAccessRel(table=[[CATALOG, CUSTOMER, ACCOUNT]])
      
      1. OPTIQ-388.1.patch
        7 kB
        Harish Butani

        Activity

        Hide
        rhbutani Harish Butani added a comment -

        Patch attached. Will send a pull request shortly.

        Show
        rhbutani Harish Butani added a comment - Patch attached. Will send a pull request shortly.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/c87a7b83 .

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            rhbutani Harish Butani
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development