You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jin Xing (Jira)" <ji...@apache.org> on 2019/11/22 07:45:00 UTC
[jira] [Reopened] (CALCITE-3431) SemiJoinRule doesn't work when
right-hand side is not Aggregate but distinct on join keys
[ https://issues.apache.org/jira/browse/CALCITE-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jin Xing reopened CALCITE-3431:
-------------------------------
> SemiJoinRule doesn't work when right-hand side is not Aggregate but distinct on join keys
> -----------------------------------------------------------------------------------------
>
> Key: CALCITE-3431
> URL: https://issues.apache.org/jira/browse/CALCITE-3431
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Jin Xing
> Assignee: Jin Xing
> Priority: Major
>
> Calcite generate semi-join by SemiJoinRule, which only works on pattern of Join(RelNode, Aggregate).
> Take below sql as an example
> {code:java}
> select * from dept
> where exists (
> select * from emp
> where emp.empno = dept.deptno)
> {code}
> If empno is a key column of emp, thus the original plan is as below
> {code:java}
> LogicalProject(DEPTNO=[$0], NAME=[$1])
> LogicalJoin(condition=[=($0, $2)], joinType=[inner])
> LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
> LogicalProject(EMPNO=[$0])
> LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> {code}
> Thus SemiJoinRule cannot support such a pattern
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)