[ 
https://issues.apache.org/jira/browse/CALCITE-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702157#comment-14702157
 ] 

Julian Hyde commented on CALCITE-816:
-------------------------------------

Now the plan is

{noformat}EnumerableCalc(expr#0..5=[{inputs}], empid=[$t0], name=[$t2])
  EnumerableCorrelate(correlation=[$cor0], joinType=[INNER], 
requiredColumns=[{1}])
    EnumerableTableScan(table=[[s, emps]])
    EnumerableAggregate(group=[{0}])
      EnumerableCalc(expr#0..3=[{inputs}], expr#4=[true], expr#5=[$cor0], 
expr#6=[$t5.deptno], expr#7=[=($t0, $t6)], i=[$t4], $condition=[$t7])
        EnumerableTableScan(table=[[s, depts]]){noformat}

and it gives the right answer. [~vlsi], what do you think?

> Represent sub-query as a RexNode
> --------------------------------
>
>                 Key: CALCITE-816
>                 URL: https://issues.apache.org/jira/browse/CALCITE-816
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> Represent IN, NOT IN, EXISTS and scalar sub-queries as RexSubQuery extends 
> RexNode. Then we can write a planner rule that expands sub-queries.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to