You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2014/08/27 00:17:59 UTC
[jira] [Updated] (OPTIQ-388) Handle semi-joins in field trimmer
[ https://issues.apache.org/jira/browse/OPTIQ-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated OPTIQ-388:
------------------------------
Summary: Handle semi-joins in field trimmer (was: Have the FieldTrimmer handle SemiJoins)
> Handle semi-joins in field trimmer
> ----------------------------------
>
> Key: OPTIQ-388
> URL: https://issues.apache.org/jira/browse/OPTIQ-388
> Project: Optiq
> Issue Type: Bug
> Reporter: Harish Butani
> Assignee: Julian Hyde
> Fix For: 0.9.1-incubating
>
> Attachments: OPTIQ-388.1.patch
>
>
> For e.g. for the following query:
> {code}
> 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
> {code}
> Projection of DeptNo should get pushed below SemiJoin
> {code}
> 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]])
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)