osdir.com

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

Re: Help with EnumerableMergeJoinRule which is losing a RelCollection trait


Have a look in CalcitePrepareImpl (
https://github.com/apache/calcite/blob/3a4fba828f3d9e48749fadd22f134891612b7072/core/src/main/java/org/apache/calcite/prepare/CalcitePrepareImpl.java#L1109
)

Possibly you need a few lines like below:

final RelCollation collation =
          rel instanceof Sort
              ? ((Sort) rel).collation
              : RelCollations.EMPTY;



Στις Παρ, 28 Σεπ 2018 στις 11:39 μ.μ., ο/η Enrico Olivelli <
eolivelli@xxxxxxxxx> έγραψε:

> Il ven 28 set 2018, 23:00 Stamatis Zampetakis <zabetak@xxxxxxxxx> ha
> scritto:
>
> > Hi Enrico,
> >
> > I didn't look thoroughly but I suspect that maybe the problem is when you
> > set the desiredTraits (
> >
> >
> https://github.com/diennea/herddb/blob/0c7c01584350d57d8102511b987e5f880f3f65bd/herddb-core/src/main/java/herddb/sql/CalcitePlanner.java#L449
> > ).
> > Apart from the EnumerableConvention, I think you should also set the
> > expected RelCollationTrait. Can you check what are the desiredTraits that
> > you are passing to the optimizer?
> >
>
> Stamatis
> You see correctly that I am passing only EnumerableConvention as
> desiredTraits.
> I can't find the 'Trait' for RelCollation, there is no constant
> like EnumerableConvention.
> Is there anya special way to instantiate it?
> I can't find and examplethe in Calcite tests
>
> Thank you so much
> Enrico
>
>
>
> > Best,
> > Stamatis
> >
> > Στις Παρ, 28 Σεπ 2018 στις 9:58 μ.μ., ο/η Enrico Olivelli <
> > eolivelli@xxxxxxxxx> έγραψε:
> >
> > > 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.ENUME