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

Lai Zhou commented on CALCITE-2592:
-----------------------------------

 

[~vladimirsitnikov],[~zhztheplayer],[~hyuan]

It produces a different error for the merge-join case in calcite-1.18.0.
{code:java}
org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node 
[rel#7:Subset#2.ENUMERABLE.[]] could not be implemented; planner state:

Root: rel#7:Subset#2.ENUMERABLE.[]
Original rel:
LogicalJoin(subset=[rel#7:Subset#2.ENUMERABLE.[]], condition=[=($0, $2)], 
joinType=[inner]): rowcount = 1.0, cumulative cost = {1.0 rows, 0.0 cpu, 0.0 
io}, id = 5
LogicalValues(subset=[rel#3:Subset#0.NONE.[1]], tuples=[[{ '2', 'a' }, { '1', 
'b' }]]): rowcount = 2.0, cumulative cost = {2.0 rows, 1.0 cpu, 0.0 io}, id = 0
LogicalValues(subset=[rel#4:Subset#1.NONE.[]], tuples=[[{ '1', 'x' }, { '2', 
'y' }]]): rowcount = 2.0, cumulative cost = {2.0 rows, 1.0 cpu, 0.0 io}, id = 1

Sets:
Set#0, type: RecordType(CHAR(1) id, CHAR(1) name)
rel#3:Subset#0.NONE.[1], best=null, importance=0.81
rel#0:LogicalValues.NONE.[1](type=RecordType(CHAR(1) id, CHAR(1) 
name),tuples=[{ '2', 'a' }, { '1', 'b' }]), rowcount=2.0, cumulative cost={inf}
rel#9:Subset#0.ENUMERABLE.[0], best=null, importance=0.9
rel#24:Subset#0.ENUMERABLE.[1], best=rel#23, importance=0.45
rel#23:EnumerableValues.ENUMERABLE.[1](type=RecordType(CHAR(1) id, CHAR(1) 
name),tuples=[{ '2', 'a' }, { '1', 'b' }]), rowcount=2.0, cumulative cost={2.0 
rows, 1.0 cpu, 0.0 io}
Set#1, type: RecordType(CHAR(1) id, CHAR(1) name)
rel#4:Subset#1.NONE.[], best=null, importance=0.81
rel#1:LogicalValues.NONE.[[0, 1], [1]](type=RecordType(CHAR(1) id, CHAR(1) 
name),tuples=[{ '1', 'x' }, { '2', 'y' }]), rowcount=2.0, cumulative cost={inf}
rel#10:Subset#1.ENUMERABLE.[0], best=rel#21, importance=0.9
rel#21:EnumerableValues.ENUMERABLE.[[0, 1], [1]](type=RecordType(CHAR(1) id, 
CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }]), rowcount=2.0, cumulative 
cost={2.0 rows, 1.0 cpu, 0.0 io}
rel#22:Subset#1.ENUMERABLE.[], best=rel#21, importance=0.45
rel#21:EnumerableValues.ENUMERABLE.[[0, 1], [1]](type=RecordType(CHAR(1) id, 
CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }]), rowcount=2.0, cumulative 
cost={2.0 rows, 1.0 cpu, 0.0 io}
Set#2, type: RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, CHAR(1) name0)
rel#6:Subset#2.NONE.[], best=null, importance=0.9
rel#5:LogicalJoin.NONE.[](left=rel#3:Subset#0.NONE.[1],right=rel#4:Subset#1.NONE.[],condition==($0,
 $2),joinType=inner), rowcount=1.0, cumulative cost={inf}
rel#15:LogicalProject.NONE.[](input=rel#14:Subset#3.NONE.[],id=$2,name=$3,id0=$0,name0=$1),
 rowcount=1.0, cumulative cost={inf}
rel#7:Subset#2.ENUMERABLE.[], best=null, importance=1.0
rel#8:AbstractConverter.ENUMERABLE.[](input=rel#6:Subset#2.NONE.[],convention=ENUMERABLE,sort=[]),
 rowcount=1.0, cumulative cost={inf}
rel#11:EnumerableMergeJoin.ENUMERABLE.[[0], 
[2]](left=rel#9:Subset#0.ENUMERABLE.[0],right=rel#10:Subset#1.ENUMERABLE.[0],condition==($0,
 $2),joinType=inner), rowcount=1.0, cumulative cost={inf}
Set#3, type: RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, CHAR(1) name0)
rel#14:Subset#3.NONE.[], best=null, importance=0.81
rel#12:LogicalJoin.NONE.[](left=rel#4:Subset#1.NONE.[],right=rel#3:Subset#0.NONE.[1],condition==($2,
 $0),joinType=inner), rowcount=1.0, cumulative cost={inf}
rel#18:LogicalProject.NONE.[](input=rel#6:Subset#2.NONE.[],id=$2,name=$3,id0=$0,name0=$1),
 rowcount=1.0, cumulative cost={inf}
rel#20:Subset#3.ENUMERABLE.[], best=null, importance=0.405
rel#19:EnumerableMergeJoin.ENUMERABLE.[[0], 
[2]](left=rel#10:Subset#1.ENUMERABLE.[0],right=rel#9:Subset#0.ENUMERABLE.[0],condition==($0,
 $2),joinType=inner), rowcount=1.0, cumulative cost={inf}



at 
org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:437)
at 
org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:296)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:657)
at 
org.apache.calcite.plan.volcano.VolcanoPlannerTest.testMergeJoin(VolcanoPlannerTest.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

{code}
In my case ,I have a try to manually apply the  sort-merge join rule for a 
theta join, but it produces the similar error.

for a join:

 
{code:java}
SELECT t1.i_item_sk,t2.i_item_sk
 FROM item t1 LEFT OUTER JOIN item_1 t2 ON t1.i_item_sk=t2.i_item_sk and 
t1.i_item_sk <10000
{code}
 

 
{code:java}
org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node 
[rel#39:Subset#5.ENUMERABLE.[]] could not be implemented; planner state:

Root: rel#39:Subset#5.ENUMERABLE.[]
Original rel:
LogicalProject(subset=[rel#39:Subset#5.ENUMERABLE.[]], i_item_sk=[$0], 
i_item_sk0=[$2]): rowcount = 375.0, cumulative cost = {375.0 rows, 750.0 cpu, 
0.0 io}, id = 33
LogicalJoin(subset=[rel#32:Subset#4.NONE.[]], condition=[AND(=($0, $2), $1)], 
joinType=[left]): rowcount = 375.0, cumulative cost = {375.0 rows, 0.0 cpu, 0.0 
io}, id = 31
LogicalProject(subset=[rel#27:Subset#1.NONE.[]], I_ITEM_SK=[$0], $f22=[IS NOT 
NULL($0)]): rowcount = 100.0, cumulative cost = {100.0 rows, 200.0 cpu, 0.0 
io}, id = 26
EnumerableTableScan(subset=[rel#25:Subset#0.ENUMERABLE.[]], table=[[ITEM]]): 
rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 7
LogicalProject(subset=[rel#30:Subset#3.NONE.[]], I_ITEM_SK=[$0]): rowcount = 
100.0, cumulative cost = {100.0 rows, 100.0 cpu, 0.0 io}, id = 29
EnumerableTableScan(subset=[rel#28:Subset#2.ENUMERABLE.[]], table=[[ITEM_1]]): 
rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 9

Sets:
Set#0, type: RecordType(BIGINT I_ITEM_SK, VARCHAR I_ITEM_ID, VARCHAR 
I_REC_START_DATE, VARCHAR I_REC_END_DATE, VARCHAR I_ITEM_DESC, DOUBLE 
I_CURRENT_PRICE, DOUBLE I_WHOLESALE_COST, INTEGER I_BRAND_ID, VARCHAR I_BRAND, 
INTEGER I_CLASS_ID, VARCHAR I_CLASS, INTEGER I_CATEGORY_ID, VARCHAR I_CATEGORY, 
INTEGER I_MANUFACT_ID, VARCHAR I_MANUFACT, VARCHAR I_SIZE, VARCHAR 
I_FORMULATION, VARCHAR I_COLOR, VARCHAR I_UNITS, VARCHAR I_CONTAINER, INTEGER 
I_MANAGER_ID, VARCHAR I_PRODUCT_NAME)
rel#25:Subset#0.ENUMERABLE.[], best=rel#7, importance=0.6561
rel#7:EnumerableTableScan.ENUMERABLE.[](table=[ITEM]), rowcount=100.0, 
cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
Set#1, type: RecordType(BIGINT I_ITEM_SK, BOOLEAN $f22)
rel#27:Subset#1.NONE.[], best=null, importance=0.7290000000000001
rel#26:LogicalProject.NONE.[](input=rel#25:Subset#0.ENUMERABLE.[],I_ITEM_SK=$0,$f22=IS
 NOT NULL($0)), rowcount=100.0, cumulative cost={inf}
rel#44:Subset#1.ENUMERABLE.[], best=rel#51, importance=0.405
rel#51:EnumerableProject.ENUMERABLE.[](input=rel#25:Subset#0.ENUMERABLE.[],I_ITEM_SK=$0,$f22=IS
 NOT NULL($0)), rowcount=100.0, cumulative cost={200.0 rows, 301.0 cpu, 0.0 io}
rel#46:Subset#1.ENUMERABLE.[0], best=null, importance=0.81
Set#2, type: RecordType(BIGINT I_ITEM_SK, VARCHAR I_ITEM_ID, VARCHAR 
I_REC_START_DATE, VARCHAR I_REC_END_DATE, VARCHAR I_ITEM_DESC, DOUBLE 
I_CURRENT_PRICE, DOUBLE I_WHOLESALE_COST, INTEGER I_BRAND_ID, VARCHAR I_BRAND, 
INTEGER I_CLASS_ID, VARCHAR I_CLASS, INTEGER I_CATEGORY_ID, VARCHAR I_CATEGORY, 
INTEGER I_MANUFACT_ID, VARCHAR I_MANUFACT, VARCHAR I_SIZE, VARCHAR 
I_FORMULATION, VARCHAR I_COLOR, VARCHAR I_UNITS, VARCHAR I_CONTAINER, INTEGER 
I_MANAGER_ID, VARCHAR I_PRODUCT_NAME)
rel#28:Subset#2.ENUMERABLE.[], best=rel#9, importance=0.6561
rel#9:EnumerableTableScan.ENUMERABLE.[](table=[ITEM_1]), rowcount=100.0, 
cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
Set#3, type: RecordType(BIGINT I_ITEM_SK)
rel#30:Subset#3.NONE.[], best=null, importance=0.7290000000000001
rel#29:LogicalProject.NONE.[](input=rel#28:Subset#2.ENUMERABLE.[],I_ITEM_SK=$0),
 rowcount=100.0, cumulative cost={inf}
rel#45:Subset#3.ENUMERABLE.[], best=rel#50, importance=0.405
rel#50:EnumerableProject.ENUMERABLE.[](input=rel#28:Subset#2.ENUMERABLE.[],I_ITEM_SK=$0),
 rowcount=100.0, cumulative cost={200.0 rows, 201.0 cpu, 0.0 io}
rel#47:Subset#3.ENUMERABLE.[0], best=null, importance=0.81
Set#4, type: RecordType(BIGINT I_ITEM_SK, BOOLEAN $f22, BIGINT I_ITEM_SK0)
rel#32:Subset#4.NONE.[], best=null, importance=0.81
rel#31:LogicalJoin.NONE.[](left=rel#27:Subset#1.NONE.[],right=rel#30:Subset#3.NONE.[],condition=AND(=($0,
 $2), $1),joinType=left), rowcount=375.0, cumulative cost={inf}
rel#41:Subset#4.ENUMERABLE.[], best=null, importance=0.9
rel#48:EnumerableMergeJoin.ENUMERABLE.[[0], 
[2]](left=rel#46:Subset#1.ENUMERABLE.[0],right=rel#47:Subset#3.ENUMERABLE.[0],condition=AND(=($0,
 $2), $1),joinType=left), rowcount=375.0, cumulative cost={inf}
Set#5, type: RecordType(BIGINT i_item_sk, BIGINT i_item_sk0)
rel#34:Subset#5.NONE.[], best=null, importance=0.9
rel#33:LogicalProject.NONE.[](input=rel#32:Subset#4.NONE.[],i_item_sk=$0,i_item_sk0=$2),
 rowcount=375.0, cumulative cost={inf}
rel#39:Subset#5.ENUMERABLE.[], best=null, importance=1.0
rel#40:AbstractConverter.ENUMERABLE.[](input=rel#34:Subset#5.NONE.[],convention=ENUMERABLE,sort=[]),
 rowcount=375.0, cumulative cost={inf}
rel#42:EnumerableProject.ENUMERABLE.[](input=rel#41:Subset#4.ENUMERABLE.[],i_item_sk=$0,i_item_sk0=$2),
 rowcount=375.0, cumulative cost={inf}



at 
org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:437)
at 
org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:296)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:657)
{code}
 

 

 

 

> EnumerableMergeJoin is never taken
> ----------------------------------
>
>                 Key: CALCITE-2592
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2592
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>         Attachments: calcite2592.png, calcite2592.svg
>
>
> I have added a test case 
> {{org.apache.calcite.plan.volcano.VolcanoPlannerTest#testMergeJoin}}
> The test fails as follows:
> {noformat}org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There 
> are not enough rules to produce a node with desired properties: 
> convention=ENUMERABLE, sort=[].
> Missing conversion is LogicalValues[convention: NONE -> ENUMERABLE, sort: [1] 
> -> [0]]
> There is 1 empty subset: rel#9:Subset#0.ENUMERABLE.[0], the relevant part of 
> the original plan is as follows
> 0:LogicalValues(tuples=[[{ '2', 'a' }, { '1', 'b' }]])
> Root: rel#7:Subset#2.ENUMERABLE.[]
> Original rel:
> LogicalJoin(subset=[rel#7:Subset#2.ENUMERABLE.[]], condition=[=($0, $2)], 
> joinType=[inner]): rowcount = 1.0, cumulative cost = {1.0 rows, 0.0 cpu, 0.0 
> io}, id = 5
>   LogicalValues(subset=[rel#3:Subset#0.NONE.[1]], tuples=[[{ '2', 'a' }, { 
> '1', 'b' }]]): rowcount = 2.0, cumulative cost = {2.0 rows, 1.0 cpu, 0.0 io}, 
> id = 0
>   LogicalValues(subset=[rel#4:Subset#1.NONE.[]], tuples=[[{ '1', 'x' }, { 
> '2', 'y' }]]): rowcount = 2.0, cumulative cost = {2.0 rows, 1.0 cpu, 0.0 io}, 
> id = 1
> Sets:
> Set#0, type: RecordType(CHAR(1) id, CHAR(1) name)
>       rel#3:Subset#0.NONE.[1], best=null, importance=0.81
>               rel#0:LogicalValues.NONE.[1](type=RecordType(CHAR(1) id, 
> CHAR(1) name),tuples=[{ '2', 'a' }, { '1', 'b' }]), rowcount=2.0, cumulative 
> cost={inf}
>       rel#9:Subset#0.ENUMERABLE.[0], best=null, importance=0.9
>       rel#24:Subset#0.ENUMERABLE.[1], best=rel#23, importance=0.45
>               rel#23:EnumerableValues.ENUMERABLE.[1](type=RecordType(CHAR(1) 
> id, CHAR(1) name),tuples=[{ '2', 'a' }, { '1', 'b' }]), rowcount=2.0, 
> cumulative cost={2.0 rows, 1.0 cpu, 0.0 io}
> Set#1, type: RecordType(CHAR(1) id, CHAR(1) name)
>       rel#4:Subset#1.NONE.[], best=null, importance=0.81
>               rel#1:LogicalValues.NONE.[[0, 1], [1]](type=RecordType(CHAR(1) 
> id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }]), rowcount=2.0, 
> cumulative cost={inf}
>       rel#10:Subset#1.ENUMERABLE.[0], best=rel#21, importance=0.9
>               rel#21:EnumerableValues.ENUMERABLE.[[0, 1], 
> [1]](type=RecordType(CHAR(1) id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 
> 'y' }]), rowcount=2.0, cumulative cost={2.0 rows, 1.0 cpu, 0.0 io}
>       rel#22:Subset#1.ENUMERABLE.[], best=rel#21, importance=0.45
>               rel#21:EnumerableValues.ENUMERABLE.[[0, 1], 
> [1]](type=RecordType(CHAR(1) id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 
> 'y' }]), rowcount=2.0, cumulative cost={2.0 rows, 1.0 cpu, 0.0 io}
> Set#2, type: RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, CHAR(1) name0)
>       rel#6:Subset#2.NONE.[], best=null, importance=0.9
>               
> rel#5:LogicalJoin.NONE.[](left=RelSubset#3,right=RelSubset#4,condition==($0, 
> $2),joinType=inner), rowcount=1.0, cumulative cost={inf}
>               
> rel#15:LogicalProject.NONE.[](input=RelSubset#14,id=$2,name=$3,id0=$0,name0=$1),
>  rowcount=1.0, cumulative cost={inf}
>       rel#7:Subset#2.ENUMERABLE.[], best=null, importance=1.0
>               
> rel#8:AbstractConverter.ENUMERABLE.[](input=RelSubset#6,convention=ENUMERABLE,sort=[]),
>  rowcount=1.0, cumulative cost={inf}
>               rel#11:EnumerableMergeJoin.ENUMERABLE.[[0], 
> [2]](left=RelSubset#9,right=RelSubset#10,condition==($0, $2),joinType=inner), 
> rowcount=1.0, cumulative cost={inf}
> Set#3, type: RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, CHAR(1) name0)
>       rel#14:Subset#3.NONE.[], best=null, importance=0.81
>               
> rel#12:LogicalJoin.NONE.[](left=RelSubset#4,right=RelSubset#3,condition==($2, 
> $0),joinType=inner), rowcount=1.0, cumulative cost={inf}
>               
> rel#18:LogicalProject.NONE.[](input=RelSubset#6,id=$2,name=$3,id0=$0,name0=$1),
>  rowcount=1.0, cumulative cost={inf}
>       rel#20:Subset#3.ENUMERABLE.[], best=null, importance=0.405
>               rel#19:EnumerableMergeJoin.ENUMERABLE.[[0], 
> [2]](left=RelSubset#10,right=RelSubset#9,condition==($0, $2),joinType=inner), 
> rowcount=1.0, cumulative cost={inf}
> Graphviz:
> digraph G {
>       root [style=filled,label="Root"];
>       subgraph cluster0{
>               label="Set 0 RecordType(CHAR(1) id, CHAR(1) name)";
>               rel0 [label="rel#0:LogicalValues(type=RecordType(CHAR(1) id, 
> CHAR(1) name),tuples=[{ '2', 'a' }, { '1', 'b' }])\nrows=2.0, 
> cost={inf}",shape=box]
>               rel23 [label="rel#23:EnumerableValues(type=RecordType(CHAR(1) 
> id, CHAR(1) name),tuples=[{ '2', 'a' }, { '1', 'b' }])\nrows=2.0, cost={2.0 
> rows, 1.0 cpu, 0.0 io}",color=blue,shape=box]
>               subset3 [label="rel#3:Subset#0.NONE.[1]"]
>               subset9 [label="rel#9:Subset#0.ENUMERABLE.[0]",color=red]
>               subset24 [label="rel#24:Subset#0.ENUMERABLE.[1]"]
>       }
>       subgraph cluster1{
>               label="Set 1 RecordType(CHAR(1) id, CHAR(1) name)";
>               rel1 [label="rel#1:LogicalValues(type=RecordType(CHAR(1) id, 
> CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }])\nrows=2.0, 
> cost={inf}",shape=box]
>               rel21 [label="rel#21:EnumerableValues(type=RecordType(CHAR(1) 
> id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }])\nrows=2.0, cost={2.0 
> rows, 1.0 cpu, 0.0 io}",color=blue,shape=box]
>               subset4 [label="rel#4:Subset#1.NONE.[]"]
>               subset10 [label="rel#10:Subset#1.ENUMERABLE.[0]"]
>               subset22 [label="rel#22:Subset#1.ENUMERABLE.[]"]
>               subset22 -> subset10;   }
>       subgraph cluster2{
>               label="Set 2 RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, 
> CHAR(1) name0)";
>               rel5 
> [label="rel#5:LogicalJoin(left=RelSubset#3,right=RelSubset#4,condition==($0, 
> $2),joinType=inner)\nrows=1.0, cost={inf}",shape=box]
>               rel8 
> [label="rel#8:AbstractConverter(input=RelSubset#6,convention=ENUMERABLE,sort=[])\nrows=1.0,
>  cost={inf}",shape=box]
>               rel11 
> [label="rel#11:EnumerableMergeJoin(left=RelSubset#9,right=RelSubset#10,condition==($0,
>  $2),joinType=inner)\nrows=1.0, cost={inf}",shape=box]
>               rel15 
> [label="rel#15:LogicalProject(input=RelSubset#14,id=$2,name=$3,id0=$0,name0=$1)\nrows=1.0,
>  cost={inf}",shape=box]
>               subset6 [label="rel#6:Subset#2.NONE.[]"]
>               subset7 [label="rel#7:Subset#2.ENUMERABLE.[]"]
>       }
>       subgraph cluster3{
>               label="Set 3 RecordType(CHAR(1) id, CHAR(1) name, CHAR(1) id0, 
> CHAR(1) name0)";
>               rel12 
> [label="rel#12:LogicalJoin(left=RelSubset#4,right=RelSubset#3,condition==($2, 
> $0),joinType=inner)\nrows=1.0, cost={inf}",shape=box]
>               rel18 
> [label="rel#18:LogicalProject(input=RelSubset#6,id=$2,name=$3,id0=$0,name0=$1)\nrows=1.0,
>  cost={inf}",shape=box]
>               rel19 
> [label="rel#19:EnumerableMergeJoin(left=RelSubset#10,right=RelSubset#9,condition==($0,
>  $2),joinType=inner)\nrows=1.0, cost={inf}",shape=box]
>               subset14 [label="rel#14:Subset#3.NONE.[]"]
>               subset20 [label="rel#20:Subset#3.ENUMERABLE.[]"]
>       }
>       root -> subset7;
>       subset3 -> rel0;
>       subset24 -> rel23[color=blue];
>       subset4 -> rel1;
>       subset22 -> rel21[color=blue];
>       subset6 -> rel5; rel5 -> subset3[label="0"]; rel5 -> subset4[label="1"];
>       subset7 -> rel8; rel8 -> subset6;
>       subset7 -> rel11; rel11 -> subset9[label="0"]; rel11 -> 
> subset10[label="1"];
>       subset6 -> rel15; rel15 -> subset14;
>       subset14 -> rel12; rel12 -> subset4[label="0"]; rel12 -> 
> subset3[label="1"];
>       subset14 -> rel18; rel18 -> subset6;
>       subset20 -> rel19; rel19 -> subset10[label="0"]; rel19 -> 
> subset9[label="1"];
> }
>       at 
> org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:587)
>       at 
> org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:304)
>       at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:655){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to