[
https://issues.apache.org/jira/browse/CALCITE-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700115#comment-14700115
]
Julian Hyde commented on CALCITE-816:
-------------------------------------
[~vlsi], I'm finishing up this jira case and the output of
EnumerableCorrelateTest.simpleCorrelate has changed. It looks to me like an
improvement. Do you agree?
Before: {noformat}
EnumerableCalc(expr#0..5=[{inputs}], expr#6=[IS NOT NULL($t5)], empid=[$t0],
name=[$t2], $condition=[$t6])
EnumerableCorrelate(correlation=[$cor0], joinType=[LEFT],
requiredColumns=[{1}])
EnumerableTableScan(table=[[s, emps]])
EnumerableAggregate(group=[{}], agg#0=[MIN($0)])
EnumerableCalc(expr#0..3=[{inputs}], expr#4=[true], expr#5=[$cor0],
expr#6=[$t5.deptno], expr#7=[=($t0, $t6)], $f0=[$t4], $condition=[$t7])
EnumerableTableScan(table=[[s, depts]])
{noformat}
After: {noformat}
EnumerableCalc(expr#0..4=[{inputs}], empid=[$t0], name=[$t2])
EnumerableCorrelate(correlation=[$cor0], joinType=[INNER],
requiredColumns=[{1}])
EnumerableTableScan(table=[[s, emps]])
EnumerableAggregate(group=[{}])
EnumerableCalc(expr#0..3=[{inputs}], expr#4=[$cor0], expr#5=[$t4.deptno],
expr#6=[=($t0, $t5)], proj#0..3=[{exprs}], $condition=[$t6])
EnumerableTableScan(table=[[s, depts]])
{noformat}
It seems that FilterJoinRule has strengthened the join type because of the IS
NOT NULL condition. The code is
https://github.com/julianhyde/incubator-calcite/commit/d537922082715dcf2855a0b8314bdb6fcac94957.
> 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)