osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with EnumerableMergeJoinRule which is losing a RelCollection trait


Sorry  in advance for this very long email....
I am trying to debug, but I honestly I did not undestand clearly how
these rules work

I have this query:
SELECT `tsql`.`k1`, `tsql`.`n1`, `tsql`.`s1`
FROM `tblspace1`.`tsql` AS `TSQL`

This is the table:
CREATE TABLE tblspace1.tsql (k1 string primary key,n1 int,s1 string)

Logical Plan Starts with:
LogicalSort(sort0=[$0], dir0=[ASC])
  LogicalProject(k1=[$0], n1=[$1], s1=[$2])
    LogicalTableScan(table=[[tblspace1, tsql]])

And the Best Exp eventually is:
EnumerableTableScan(table=[[tblspace1, tsql]]): rowcount = 1.0,
cumulative cost = {1.0 rows, 2.0 cpu, 0.0 io}, id = 33

The problem is that the Sort disappears.
The Table is configured with Statistics without any Collation
Statistics.of(tableManager.getStats().getTablesize(), keys)

This happens if I enable these traits on the Planner:
ConventionTraitDef.INSTANCE, RelCollationTraitDef.INSTANCE

if I enable only ConventionTraitDef the sort does not disappear

These are "TRACE" level logs of the Planner

Maybe some expert of you can see inside the logs the anwer to my problem.

Thank you in advace, I know that your time is valuable. I appreciate
any kind of help

Enrico


[main] TRACE org.apache.calcite.sql.parser - After validation: SELECT
`tsql`.`k1`, `tsql`.`n1`, `tsql`.`s1`
FROM `tblspace1`.`tsql` AS `TSQL`
ORDER BY `K1`
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalTableScan#30
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#31
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalSort#32
[main] DEBUG org.apache.calcite.sql2rel - Plan after converting
SqlNode to RelNode
LogicalSort(sort0=[$0], dir0=[ASC])
  LogicalProject(k1=[$0], n1=[$1], s1=[$2])
    LogicalTableScan(table=[[tblspace1, tsql]])

[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableTableScan#33
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#34
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalSort#35
Query: select * from tblspace1.tsql order by k1
-- Best  Plan
LogicalSort(sort0=[$0], dir0=[ASC]): rowcount = 1.0, cumulative cost =
{3.0 rows, 17.0 cpu, 0.0 io}, id = 35
  LogicalProject(k1=[$0], n1=[$1], s1=[$2]): rowcount = 1.0,
cumulative cost = {2.0 rows, 5.0 cpu, 0.0 io}, id = 34
    EnumerableTableScan(table=[[tblspace1, tsql]]): rowcount = 1.0,
cumulative cost = {1.0 rows, 2.0 cpu, 0.0 io}, id = 33

[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#36
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Subset cost
improved: subset [rel#36:Subset#0.ENUMERABLE.[]] cost was {inf} now
{1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql]) in
rel#36:Subset#0.ENUMERABLE.[]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#37
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#38
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)
in rel#38:Subset#1.NONE.[]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] to its parent
[rel#38:Subset#1.NONE.[]] is 0.0 (parent importance=0.0, child
cost=3.0, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalSort#39
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#40
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)
in rel#40:Subset#2.NONE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] to its parent [rel#40:Subset#2.NONE.[0]] is
0.0 (parent importance=0.0, child cost=1.0E30, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#40:Subset#2.NONE.[0]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#41
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 1/1;
PHASE = PRE_PROCESS_MDR; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#41:Subset#2.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.0
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
Set#2, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#40:Subset#2.NONE.[0], best=null, importance=0.0
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#41:Subset#2.ENUMERABLE.[], best=null, importance=0.0

Importances: { rel#36:Subset#0.ENUMERABLE.[]=0.0
rel#38:Subset#1.NONE.[]=0.0 rel#40:Subset#2.NONE.[0]=0.0}

[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 2/1;
PHASE = PRE_PROCESS; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#41:Subset#2.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.0
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
Set#2, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#40:Subset#2.NONE.[0], best=null, importance=0.0
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#41:Subset#2.ENUMERABLE.[], best=null, importance=0.0

Importances: { rel#36:Subset#0.ENUMERABLE.[]=0.0
rel#38:Subset#1.NONE.[]=0.0 rel#40:Subset#2.NONE.[0]=0.0}

[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 3/1;
PHASE = OPTIMIZE; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#41:Subset#2.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.0
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
Set#2, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#40:Subset#2.NONE.[0], best=null, importance=0.0
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#41:Subset#2.ENUMERABLE.[], best=null, importance=0.0

Importances: { rel#36:Subset#0.ENUMERABLE.[]=0.0
rel#38:Subset#1.NONE.[]=0.0 rel#40:Subset#2.NONE.[0]=0.0}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.0
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.0
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.0
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.0
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.0
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.0
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.0
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.0
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#446: Apply
rule [SortRemoveRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#42
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#42 via SortRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#446: Rule
SortRemoveRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
created rel#42:RelSubset
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Merge set#2 into set#1
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#43
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new AbstractConverter#44
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[])
in rel#43:Subset#1.ENUMERABLE.[]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] to its parent [rel#42:Subset#1.NONE.[0]] is
0.0 (parent importance=0.0, child cost=1.0E30, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] to its parent
[rel#43:Subset#1.ENUMERABLE.[]] is 0.0 (parent importance=0.0, child
cost=1.0E30, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#38:Subset#1.NONE.[]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#43:Subset#1.ENUMERABLE.[]] is 1.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#446
generated 1 successors: [rel#42:Subset#1.NONE.[0]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 4/2;
PHASE = OPTIMIZE; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#43:Subset#1.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.5
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#42:Subset#1.NONE.[0], best=null, importance=0.5
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#43:Subset#1.ENUMERABLE.[], best=null, importance=1.0
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#43:Subset#1.ENUMERABLE.[]=1.0
rel#38:Subset#1.NONE.[]=0.0 rel#36:Subset#0.ENUMERABLE.[]=0.0}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#550: Apply
rule [ExpandConversionRule] to
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#550
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 5/3;
PHASE = OPTIMIZE; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#43:Subset#1.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.5
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#42:Subset#1.NONE.[0], best=null, importance=0.5
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#43:Subset#1.ENUMERABLE.[], best=null, importance=1.0
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#43:Subset#1.ENUMERABLE.[]=1.0
rel#38:Subset#1.NONE.[]=0.0 rel#36:Subset#0.ENUMERABLE.[]=0.0}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#434: Apply
rule [SortRemoveConstantKeysRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#434
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 6/4;
PHASE = OPTIMIZE; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#43:Subset#1.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.5
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#42:Subset#1.NONE.[0], best=null, importance=0.5
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
    rel#43:Subset#1.ENUMERABLE.[], best=null, importance=1.0
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#43:Subset#1.ENUMERABLE.[]=1.0
rel#38:Subset#1.NONE.[]=0.0 rel#36:Subset#0.ENUMERABLE.[]=0.0}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#444: Apply
rule [SortProjectTransposeRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalSort#45
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#46
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#46 via SortProjectTransposeRule with equivalences
{LogicalSort#45=rel#36:Subset#0.ENUMERABLE.[]}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#444: Rule
SortProjectTransposeRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
created rel#46:LogicalProject
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#47
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
in rel#47:Subset#0.NONE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] to its parent
[rel#38:Subset#1.NONE.[]] is 1.5E-30 (parent importance=0.5, child
cost=3.0, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] to its parent
[rel#47:Subset#0.NONE.[0]] is 0.0 (parent importance=0.0, child
cost=3.0, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 1.5E-30
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#47:Subset#0.NONE.[0]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#48
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)
in rel#42:Subset#1.NONE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#47:Subset#0.NONE.[0]] to its parent [rel#42:Subset#1.NONE.[0]] is
0.495 (parent importance=0.5, child cost=1.0E30, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#47:Subset#0.NONE.[0]] is 0.495
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#42:Subset#1.NONE.[0]] is 0.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableProjectRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectRemoveRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#444
generated 1 successors: [LogicalProject#46]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 7/5;
PHASE = OPTIMIZE; COST = {inf}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#43:Subset#1.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
Set#1, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#38:Subset#1.NONE.[], best=null, importance=0.5
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#42:Subset#1.NONE.[0], best=null, importance=0.5
        rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#43:Subset#1.ENUMERABLE.[], best=null, importance=1.0
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#43:Subset#1.ENUMERABLE.[]=1.0
rel#38:Subset#1.NONE.[]=0.0 rel#42:Subset#1.NONE.[0]=0.0
rel#47:Subset#0.NONE.[0]=0.495 rel#36:Subset#0.ENUMERABLE.[]=1.5E-30}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectRemoveRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [SortRemoveRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableProjectRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [SortRemoveRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectRemoveRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#617: Apply
rule [ProjectRemoveRule] to
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register #47
rel#47:Subset#0.NONE.[0], and merge sets
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Merge set#1 into set#0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#49
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Rename #39 from
'LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)'
to 'LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)'
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Rename #44 from
'AbstractConverter.ENUMERABLE.[](input=rel#38:Subset#1.NONE.[],convention=ENUMERABLE,sort=[])'
to 'AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])'
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#47 via ProjectRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#617: Rule
ProjectRemoveRule arguments
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
created rel#47:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#617
generated 1 successors: [rel#47:Subset#0.NONE.[0]]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - boostImportance(1.0, [])
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 8/6;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableProjectRule] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#615: Apply
rule [EnumerableProjectRule] to
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new RelSubset#50
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableProject#51
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#51 via EnumerableProjectRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#615: Rule
EnumerableProjectRule arguments
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
created rel#51:EnumerableProject
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)
in rel#50:Subset#0.ENUMERABLE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] to its parent
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.245025 (parent
importance=0.2475, child cost=1.0E30, parent cost=1.0E30)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.245025
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#615
generated 1 successors:
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 9/7;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#571: Apply
rule [SortRemoveRule] to
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#50 via SortRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#571: Rule
SortRemoveRule arguments
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
created rel#50:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#571
generated 1 successors: [rel#50:Subset#0.ENUMERABLE.[0]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 10/8;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#737: Apply
rule [SortRemoveRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#47 via SortRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#737: Rule
SortRemoveRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
created rel#47:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#737
generated 1 successors: [rel#47:Subset#0.NONE.[0]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 11/9;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveConstantKeysRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#560: Apply
rule [SortRemoveConstantKeysRule] to
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#560
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 12/10;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveConstantKeysRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#724: Apply
rule [SortRemoveConstantKeysRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#724
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 13/11;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortProjectTransposeRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#708: Apply
rule [SortProjectTransposeRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalSort#52
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#53
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#53 via SortProjectTransposeRule with equivalences
{LogicalSort#52=rel#36:Subset#0.ENUMERABLE.[]}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#708: Rule
SortProjectTransposeRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
created rel#53:LogicalProject
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register: rel#52
is equivalent to
rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register: rel#52
is equivalent to
rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new LogicalProject#54
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register: rel#54
is equivalent to
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#708
generated 1 successors: [LogicalProject#53]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 14/12;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[PruneSortLimit0] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#566: Apply
rule [PruneSortLimit0] to
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#566
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 15/13;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#730: Apply
rule [PruneSortLimit0] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#730
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 16/14;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=0.2475
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.495
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.2475
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=null, importance=0.2475
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}

Importances: { rel#47:Subset#0.NONE.[0]=0.495
rel#36:Subset#0.ENUMERABLE.[]=1.5E-30
rel#50:Subset#0.ENUMERABLE.[0]=0.245025}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[ProjectMergeRule:force_mode] rels
[rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
importance 0.2475
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.2475
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.2475
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.495
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableSortRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#568: Apply
rule [EnumerableSortRule] to
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableSort#55
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#55 via EnumerableSortRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#568: Rule
EnumerableSortRule arguments
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
created rel#55:EnumerableSort
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Subset cost
improved: subset [rel#50:Subset#0.ENUMERABLE.[0]] cost was {inf} now
{2.0 rows, 14.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] to its parent
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.245025 (parent
importance=0.2475, child cost=16.0, parent cost=16.0)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.245025
[main] TRACE org.apache.calcite.plan.RelOptPlanner - cyclic:
rel#50:Subset#0.ENUMERABLE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
in rel#50:Subset#0.ENUMERABLE.[0]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 1.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] to its parent
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.495 (parent importance=0.5,
child cost=16.0, parent cost=16.0)
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#50:Subset#0.ENUMERABLE.[0]] is 0.495
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveConstantKeysRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [PruneSortLimit0] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [SortRemoveRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#568
generated 1 successors:
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 17/15;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [SortRemoveConstantKeysRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ExpandConversionRule] rels
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#798: Apply
rule [ExpandConversionRule] to
[rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#798
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 18/16;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [SortRemoveConstantKeysRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#848: Apply
rule [SortRemoveRule] to
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#50 via SortRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#848: Rule
SortRemoveRule arguments
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
created rel#50:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#848
generated 1 successors: [rel#50:Subset#0.ENUMERABLE.[0]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 19/17;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [PruneSortLimit0] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[SortRemoveConstantKeysRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#839: Apply
rule [SortRemoveConstantKeysRule] to
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#839
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 20/18;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[PruneSortLimit0] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#845: Apply
rule [PruneSortLimit0] to
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#845
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 21/19;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectRemoveRule] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#822: Apply
rule [ProjectRemoveRule] to
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#50 via ProjectRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#822: Rule
ProjectRemoveRule arguments
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
created rel#50:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#822
generated 1 successors: [rel#50:Subset#0.ENUMERABLE.[0]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 22/20;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[ProjectMergeRule:force_mode] rels
[rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableLimitRule] rels
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#856: Apply
rule [EnumerableLimitRule] to
[rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#856
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 23/21;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#732: Apply
rule [EnumerableSortRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableSort#56
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#56 via EnumerableSortRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#732: Rule
EnumerableSortRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
created rel#56:EnumerableSort
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register: rel#56
is equivalent to
rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#732
generated 1 successors:
[rel#56:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 24/22;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableLimitRule] rels
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#579: Apply
rule [EnumerableLimitRule] to
[rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#579
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 25/23;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#745: Apply
rule [EnumerableLimitRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#745
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 26/24;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#809: Apply
rule [ProjectMergeRule:force_mode] to
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#809
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 27/25;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
importance 0.5
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[PruneSortLimit0] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#440: Apply
rule [PruneSortLimit0] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#440
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 28/26;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectScanRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#401: Apply
rule [ProjectScanRule] to
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#401
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 29/27;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectRemoveRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#399: Apply
rule [ProjectRemoveRule] to
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#36 via ProjectRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#399: Rule
ProjectRemoveRule arguments
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
created rel#36:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#399
generated 1 successors: [rel#36:Subset#0.ENUMERABLE.[]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 30/28;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableSortRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#442: Apply
rule [EnumerableSortRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableSort#57
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#57 via EnumerableSortRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#442: Rule
EnumerableSortRule arguments
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
created rel#57:EnumerableSort
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register: rel#57
is equivalent to
rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#442
generated 1 successors:
[rel#57:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 31/29;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableProjectRule] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#397: Apply
rule [EnumerableProjectRule] to
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - new EnumerableProject#58
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#58 via EnumerableProjectRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#397: Rule
EnumerableProjectRule arguments
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
created rel#58:EnumerableProject
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Register
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)
in rel#36:Subset#0.ENUMERABLE.[]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 1.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Importance of
[rel#36:Subset#0.ENUMERABLE.[]] is 1.0
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectRemoveRule] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - OPTIMIZE
Rule-match queued: rule [ProjectScanRule] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#397
generated 1 successors:
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 32/30;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectRemoveRule] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[ProjectScanRule] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectRemoveRule] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#881: Apply
rule [ProjectRemoveRule] to
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Transform to:
rel#36 via ProjectRemoveRule
[main] TRACE org.apache.calcite.plan.RelOptPlanner - call#881: Rule
ProjectRemoveRule arguments
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
created rel#36:RelSubset
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#881
generated 1 successors: [rel#36:Subset#0.ENUMERABLE.[]]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 33/31;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
importance 1.0
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Skip match: rule
[ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
importance 0.5
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectMergeRule:force_mode] rels
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#865: Apply
rule [ProjectMergeRule:force_mode] to
[rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#865
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 34/32;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
rule [EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#38:Subset#1.NONE.[],sort0=$0,dir0=ASC)]
importance 0.5
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[ProjectMergeRule:force_mode] rels
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#868: Apply
rule [ProjectMergeRule:force_mode] to
[rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#868
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 35/33;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Sorted rule queue:
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Pop match: rule
[EnumerableLimitRule] rels
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#454: Apply
rule [EnumerableLimitRule] to
[rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC)]
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - call#454
generated 0 successors.
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 36/34;
PHASE = OPTIMIZE; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.5
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.5
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#47:Subset#0.NONE.[0]=0.495 rel#50:Subset#0.ENUMERABLE.[0]=0.495}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - boostImportance(1.0, [])
[main] DEBUG org.apache.calcite.plan.RelOptPlanner - PLANNER =
org.apache.calcite.plan.volcano.VolcanoPlanner@61e3a1fd; TICK = 37/1;
PHASE = CLEANUP; COST = {1.0 rows, 2.0 cpu, 0.0 io}
[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.81
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.9
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.9
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}

Importances: { rel#36:Subset#0.ENUMERABLE.[]=1.0
rel#49:Subset#0.NONE.[]=0.9 rel#50:Subset#0.ENUMERABLE.[0]=0.9
rel#47:Subset#0.NONE.[0]=0.81}

[main] TRACE org.apache.calcite.plan.RelOptPlanner - Root:
rel#36:Subset#0.ENUMERABLE.[]
Original rel:
LogicalSort(subset=[rel#41:Subset#2.ENUMERABLE.[]], sort0=[$0],
dir0=[ASC]): rowcount = 1.0, cumulative cost = {1.0 rows, 12.0 cpu,
0.0 io}, id = 39
  LogicalProject(subset=[rel#38:Subset#1.NONE.[]], k1=[$0], n1=[$1],
s1=[$2]): rowcount = 1.0, cumulative cost = {1.0 rows, 3.0 cpu, 0.0
io}, id = 37
    EnumerableTableScan(subset=[rel#36:Subset#0.ENUMERABLE.[]],
table=[[tblspace1, tsql]]): rowcount = 1.0, cumulative cost = {1.0
rows, 2.0 cpu, 0.0 io}, id = 33

Sets:
Set#0, type: RecordType(VARCHAR k1, INTEGER n1, VARCHAR s1)
    rel#36:Subset#0.ENUMERABLE.[], best=rel#33, importance=1.0
        rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1,
tsql]), rowcount=1.0, cumulative cost={1.0 rows, 2.0 cpu, 0.0 io}
        rel#44:AbstractConverter.ENUMERABLE.[](input=rel#49:Subset#0.NONE.[],convention=ENUMERABLE,sort=[]),
rowcount=1.0, cumulative cost={inf}
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}
        rel#58:EnumerableProject.ENUMERABLE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={2.0 rows, 5.0 cpu, 0.0 io}
    rel#47:Subset#0.NONE.[0], best=null, importance=0.81
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#49:Subset#0.NONE.[], best=null, importance=0.9
        rel#45:LogicalSort.NONE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#37:LogicalProject.NONE.[](input=rel#36:Subset#0.ENUMERABLE.[],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
        rel#39:LogicalSort.NONE.[0](input=rel#49:Subset#0.NONE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={inf}
        rel#48:LogicalProject.NONE.[0](input=rel#47:Subset#0.NONE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={inf}
    rel#50:Subset#0.ENUMERABLE.[0], best=rel#55, importance=0.9
        rel#51:EnumerableProject.ENUMERABLE.[[0]](input=rel#50:Subset#0.ENUMERABLE.[0],k1=$0,n1=$1,s1=$2),
rowcount=1.0, cumulative cost={3.0 rows, 17.0 cpu, 0.0 io}
        rel#55:EnumerableSort.ENUMERABLE.[0](input=rel#36:Subset#0.ENUMERABLE.[],sort0=$0,dir0=ASC),
rowcount=1.0, cumulative cost={2.0 rows, 14.0 cpu, 0.0 io}


[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Cheapest plan:
EnumerableTableScan(table=[[tblspace1, tsql]]): rowcount = 1.0,
cumulative cost = {1.0 rows, 2.0 cpu, 0.0 io}, id = 33

[main] DEBUG org.apache.calcite.plan.RelOptPlanner - Provenance:
rel#33:EnumerableTableScan.ENUMERABLE.[](table=[tblspace1, tsql])
  no parent

Query: select * from tblspace1.tsql order by k1
-- Best  Plan
EnumerableTableScan(table=[[tblspace1, tsql]]): rowcount = 1.0,
cumulative cost = {1.0 rows, 2.0 cpu, 0.0 io}, id = 33
Il giorno mar 25 set 2018 alle ore 17:19 Stamatis Zampetakis
<zabetak@xxxxxxxxx> ha scritto:
>
> A disappearing Sort operator makes me think of SortRemoveRule.
> I am not sure if you are using this rule but it might worth setting a
> breakpoint at the onMatch method.
>
> Since your problem seems related with the RelCollationTraitDef you may also
> want to look in
> RelCollationTraitDef#convert method.
>
>
> Στις Δευ, 24 Σεπ 2018 στις 11:05 μ.μ., ο/η Enrico Olivelli <
> eolivelli@xxxxxxxxx> έγραψε:
>
> > Il lun 24 set 2018, 13:50 Enrico Olivelli <eolivelli@xxxxxxxxx> ha
> > scritto:
> >
> > >
> > >
> > > Il dom 23 set 2018, 22:22 Vladimir Sitnikov <sitnikov.vladimir@xxxxxxxxx
> > >
> > > ha scritto:
> > >
> > >> Enrico,
> > >>
> > >> 1) EnumerableMergeJoinRule does not seem to work (see
> > >> https://issues.apache.org/jira/browse/CALCITE-2592 ).
> > >> It seems to be broken since Calcite 1.9.0
> > >>
> > >> 2) It turns out you need to add RelTraitDefs explicitly to the planner,
> > >> otherwise it just ignores the traits (or something like that).
> > >>
> > >> Would you please try
> > >> adding org.apache.calcite.rel.RelCollationTraitDef#INSTANCE to the list
> > of
> > >> traits you use for planning? (see
> > >>
> > >>
> > https://github.com/diennea/herddb/blob/0c7c01584350d57d8102511b987e5f880f3f65bd/herddb-core/src/main/java/herddb/sql/CalcitePlanner.java#L412
> > >>  )
> > >>
> > >> It works!
> > >>
> > >
> > > Now the planner does not choose a merge join as expected. And I guess it
> > > will never do so due the bug you have mentioned
> > >
> >
> > Too early.
> > Now the planner is stripping every EnumerableSort from the plan, leading to
> > wrong results at every query with 'order by'
> > I am debugging...
> > Maybe any bell rings...
> >
> >
> > Enrico
> >
> >
> >
> >
> > > Thank you very much
> > >
> > > Enrico
> > >
> > >
> > >>
> > >> PS. You are using a somewhat creative way of planning the whole thing as
> > >> Enumerable then converting the plan relations to your own format.
> > >>
> > >
> > > Uh
> > > Othewise I should have created my own Convention, but as far I understand
> > > it is not really needed, in the future maybe we refactor the whole
> > > integration with Calcite
> > >
> > > Enrico
> > >
> > >
> > >> Vladimir
> > >
> > >
> > >> --
> > >
> > >
> > > -- Enrico Olivelli
> > >
> > --
> >
> >
> > -- Enrico Olivelli
> >