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

Roman Kondakov updated IGNITE-12913:
------------------------------------
    Description: 
We need to add  next rules to planner
 * FilterJoinRule,
 * JoinAddRedundantSemiJoinRule,
 * SemiJoinRemoveRule

In order to be able to make this transformation for the query:
{noformat}
"select e.ename from emp e, dept d\n"
        + "where e.deptno = d.deptno"

BEFORE=
LogicalProject(ENAME=[$1])
  LogicalFilter(condition=[=($3, $5)])
    LogicalJoin(condition=[true], joinType=[inner])
      IgniteTableScan(table=[[PUBLIC, EMP]])
      IgniteTableScan(table=[[PUBLIC, DEPT]])

AFTER=
IgniteProject(ENAME=[$1])
  IgniteJoin(condition=[=($3, $5)], joinType=[inner])
    IgniteTableScan(table=[[PUBLIC, EMP]])
    IgniteTableScan(table=[[PUBLIC, DEPT]])
{noformat}
 

 

  was:
We need to add  next rules to planner
 * FilterMergeRule
 * FilterProjectTransposeRule

In order to be able to make this transformation for the query:
{noformat}
"select name from (\n"
        + "  select *\n"
        + "  from dept\n"
        + "  where deptno = 10)\n"
        + "where deptno = 10\n"

BEFORE=
LogicalProject(NAME=[$1])
  LogicalFilter(condition=[=(CAST($0):INTEGER, 10)])
    LogicalProject(DEPTNO=[$0], NAME=[$1])
      LogicalFilter(condition=[=(CAST($0):INTEGER, 10)])
        IgniteTableScan(table=[[PUBLIC, DEPT]])

AFTER=
IgniteProject(NAME=[$1])
  IgniteProject(DEPTNO=[$0], NAME=[$1])
    IgniteFilter(condition=[=(CAST($0):INTEGER, 10)])
      IgniteTableScan(table=[[PUBLIC, DEPT]])
{noformat}
 

 


> Calcite integration: Add semi join remove rule to the planner
> -------------------------------------------------------------
>
>                 Key: IGNITE-12913
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12913
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Roman Kondakov
>            Priority: Major
>
> We need to add  next rules to planner
>  * FilterJoinRule,
>  * JoinAddRedundantSemiJoinRule,
>  * SemiJoinRemoveRule
> In order to be able to make this transformation for the query:
> {noformat}
> "select e.ename from emp e, dept d\n"
>         + "where e.deptno = d.deptno"
> BEFORE=
> LogicalProject(ENAME=[$1])
>   LogicalFilter(condition=[=($3, $5)])
>     LogicalJoin(condition=[true], joinType=[inner])
>       IgniteTableScan(table=[[PUBLIC, EMP]])
>       IgniteTableScan(table=[[PUBLIC, DEPT]])
> AFTER=
> IgniteProject(ENAME=[$1])
>   IgniteJoin(condition=[=($3, $5)], joinType=[inner])
>     IgniteTableScan(table=[[PUBLIC, EMP]])
>     IgniteTableScan(table=[[PUBLIC, DEPT]])
> {noformat}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to