vlsi commented on issue #1024: [CALCITE-2817] Make CannotPlanException great URL: https://github.com/apache/calcite/pull/1024#issuecomment-462912687 Sample messages: ``` There are not enough rules to produce a node with desired properties: convention=ENUMERABLE, sort=[]. Missing conversion is LogicalAggregate[convention: NONE -> ENUMERABLE] There is 1 empty subset: rel#45:Subset#6.ENUMERABLE.[], the relevant part of the original plan is as follows 38:LogicalAggregate(group=[{0, 1}]) 36:LogicalProject(subset=[rel#37:Subset#5.NONE.[]], EMPNO=[$0], DESC=[$3]) 34:LogicalFilter(subset=[rel#35:Subset#4.NONE.[]], condition=[AND(=(CAST($1):INTEGER NOT NULL, $2), =($3, 'SameName'))]) 32:LogicalJoin(subset=[rel#33:Subset#3.NONE.[]], condition=[true], joinType=[inner]) 0:EnumerableTableScan(subset=[rel#28:Subset#0.ENUMERABLE.[]], table=[[SALES, EMPS]]) 2:LogicalValues(subset=[rel#29:Subset#1.NONE.[]], tuples=[[{ 10, 'SameName' }]]) Root: rel#45:Subset#6.ENUMERABLE.[] Original rel: LogicalAggregate(group=[{0, 1}]): rowcount = 1.0, cumulative cost = {207.5 rows, 208.5 cpu, 0.0 io}, id = 27 LogicalProject(EMPNO=[$0], DESC=[$3]): rowcount = 2.25, cumulative cost = {206.5 rows, 208.5 cpu, 0.0 io}, id = 26 LogicalFilter(condition=[AND(=(CAST($1):INTEGER NOT NULL, $2), =($3, 'SameName'))]): rowcount = 2.25, cumulative cost = {204.25 rows, 204.0 cpu, 0.0 io}, id = 25 LogicalJoin(condition=[true], joinType=[inner]): rowcount = 100.0, cumulative cost = {202.0 rows, 104.0 cpu, 0.0 io}, id = 17 EnumerableTableScan(table=[[SALES, EMPS]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 0 LogicalProject(ID=[$0], DESC=[$1]): rowcount = 1.0, cumulative cost = {2.0 rows, 3.0 cpu, 0.0 io}, id = 15 LogicalValues(tuples=[[{ 10, 'SameName' }]]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 2 Sets: Set#0, ... ``` ``` There are not enough rules to produce a node with desired properties: convention=ENUMERABLE, sort=[]. Missing conversions are LogicalAggregate[convention: NONE -> ENUMERABLE], LogicalProject[convention: NONE -> ENUMERABLE, sort: [] -> [0, 1]], LogicalProject[convention: NONE -> ENUMERABLE, sort: [] -> [2, 3]] There are 3 empty subsets: Empty subset 0: rel#1443:Subset#1.ENUMERABLE.[0, 1], the relevant part of the original plan is as follows 1372:LogicalProject(empid=[$0], deptno=[$1], name=[$2]) 1321:EnumerableTableScan(subset=[rel#1371:Subset#0.ENUMERABLE.[]], table=[[hr, emps]]) Empty subset 1: rel#1479:Subset#5.ENUMERABLE.[], the relevant part of the original plan is as follows 1379:LogicalAggregate(group=[{0, 1}]) 1377:LogicalProject(subset=[rel#1378:Subset#4.NONE.[]], empid=[$0], deptno=[$1]) 1321:EnumerableTableScan(subset=[rel#1371:Subset#0.ENUMERABLE.[]], table=[[hr, emps]]) Empty subset 2: rel#1442:Subset#7.ENUMERABLE.[2, 3], the relevant part of the original plan is as follows 1383:LogicalProject(deptno=[$0], M=[MAX(+($0, $1)) OVER (PARTITION BY $2 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)], empid=[$1], deptno0=[$2]) 1381:LogicalJoin(subset=[rel#1382:Subset#6.NONE.[]], condition=[true], joinType=[inner]) 1375:LogicalProject(subset=[rel#1376:Subset#3.NONE.[]], deptno=[$0]) 1322:EnumerableTableScan(subset=[rel#1374:Subset#2.ENUMERABLE.[]], table=[[hr, depts]]) 1379:LogicalAggregate(subset=[rel#1380:Subset#5.NONE.[]], group=[{0, 1}]) 1377:LogicalProject(subset=[rel#1378:Subset#4.NONE.[]], empid=[$0], deptno=[$1]) 1321:EnumerableTableScan(subset=[rel#1371:Subset#0.ENUMERABLE.[]], table=[[hr, emps]]) Root: rel#1397:Subset#9.ENUMERABLE.[] Original rel: LogicalProject(name=[$2], deptno=[$3], M=[$4]): rowcount = 2250.0, cumulative cost = {7110.0 rows, 11653.0 cpu, 0.0 io}, id = 1370 LogicalJoin(condition=[AND(=($0, $5), =($1, $6))], joinType=[inner]): rowcount = 2250.0, cumulative cost = {4860.0 rows, 4903.0 cpu, 0.0 io}, id = 1369 LogicalProject(empid=[$0], deptno=[$1], name=[$2]): rowcount = 100.0, cumulative cost = {200.0 rows, 401.0 cpu, 0.0 io}, id = 1362 EnumerableTableScan(table=[[hr, emps]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 1321 LogicalProject(deptno=[$0], M=[MAX(+($0, $1)) OVER (PARTITION BY $2 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)], empid=[$1], deptno0=[$2]): rowcount = 1000.0, cumulative cost = {2410.0 rows, 4502.0 cpu, 0.0 io}, id = 1368 LogicalJoin(condition=[true], joinType=[inner]): rowcount = 1000.0, cumulative cost = {1410.0 rows, 502.0 cpu, 0.0 io}, id = 1367 LogicalProject(deptno=[$0]): rowcount = 100.0, cumulative cost = {200.0 rows, 201.0 cpu, 0.0 io}, id = 1363 EnumerableTableScan(table=[[hr, depts]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 1322 LogicalAggregate(group=[{0, 1}]): rowcount = 10.0, cumulative cost = {210.0 rows, 301.0 cpu, 0.0 io}, id = 1366 LogicalProject(empid=[$0], deptno=[$1]): rowcount = 100.0, cumulative cost = {200.0 rows, 301.0 cpu, 0.0 io}, id = 1365 EnumerableTableScan(table=[[hr, emps]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 1321 Sets: Set#0, ... ``` ``` There are not enough rules to produce a node with desired properties: convention=ENUMERABLE, sort=[]. Missing conversions are LogicalAggregate[convention: NONE -> ENUMERABLE, sort: [] -> [0]], LogicalAggregate[convention: NONE -> ENUMERABLE], LogicalProject[convention: NONE -> ENUMERABLE, sort: [0] -> [1]], LogicalJoin[convention: NONE -> ENUMERABLE, sort: [] -> [2]], LogicalJoin[convention: NONE -> ENUMERABLE, sort: [] -> [1]] There are 5 empty subsets: Empty subset 0: rel#5398:Subset#4.ENUMERABLE.[1], the relevant part of the original plan is as follows 5183:LogicalJoin(condition=[=($2, $4)], joinType=[inner]) 5178:LogicalProject(subset=[rel#5179:Subset#1.NONE.[0]], employee_id=[$0], store_id=[$6], department_id=[$7], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) 5181:LogicalProject(subset=[rel#5182:Subset#3.NONE.[0]], department_id=[$0]) 5125:EnumerableTableScan(subset=[rel#5180:Subset#2.ENUMERABLE.[0]], table=[[foodmart2, department]]) Empty subset 1: rel#5331:Subset#15.ENUMERABLE.[], the relevant part of the original plan is as follows 5298:LogicalAggregate(group=[{0}], agg#0=[SUM($1)], agg#1=[COUNT()]) 5185:LogicalProject(subset=[rel#5186:Subset#5.NONE.[]], store_id=[$6], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) Empty subset 2: rel#5388:Subset#6.ENUMERABLE.[0], the relevant part of the original plan is as follows 5187:LogicalAggregate(group=[{0}], EXPR$0=[AVG($1)]) 5185:LogicalProject(subset=[rel#5186:Subset#5.NONE.[]], store_id=[$6], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) Empty subset 3: rel#5403:Subset#9.ENUMERABLE.[2], the relevant part of the original plan is as follows 5207:LogicalJoin(condition=[AND(=($1, $4), >($3, $5))], joinType=[inner]) 5178:LogicalProject(subset=[rel#5179:Subset#1.NONE.[0]], employee_id=[$0], store_id=[$6], department_id=[$7], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) 5187:LogicalAggregate(subset=[rel#5188:Subset#6.NONE.[]], group=[{0}], EXPR$0=[AVG($1)]) 5185:LogicalProject(subset=[rel#5186:Subset#5.NONE.[]], store_id=[$6], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) Empty subset 4: rel#5389:Subset#1.ENUMERABLE.[1], the relevant part of the original plan is as follows 5178:LogicalProject(employee_id=[$0], store_id=[$6], department_id=[$7], salary=[$11]) 5123:EnumerableTableScan(subset=[rel#5177:Subset#0.ENUMERABLE.[0]], table=[[foodmart2, employee]]) Root: rel#5200:Subset#8.ENUMERABLE.[] Original rel: LogicalProject(employee_id=[$0], department_id=[$4]): rowcount = 18009.337499999998, cumulative cost = {42871.612499999996 rows, 45285.674999999996 cpu, 0.0 io}, id = 5176 LogicalJoin(condition=[AND(=($1, $5), >($3, $6))], joinType=[inner]): rowcount = 18009.337499999998, cumulative cost = {24862.274999999998 rows, 9267.0 cpu, 0.0 io}, id = 5174 LogicalJoin(condition=[=($2, $4)], joinType=[inner]): rowcount = 2079.0, cumulative cost = {4413.0 rows, 5801.0 cpu, 0.0 io}, id = 5170 LogicalProject(employee_id=[$0], store_id=[$6], department_id=[$7], salary=[$11]): rowcount = 1155.0, cumulative cost = {2310.0 rows, 5776.0 cpu, 0.0 io}, id = 5167 EnumerableTableScan(table=[[foodmart2, employee]]): rowcount = 1155.0, cumulative cost = {1155.0 rows, 1156.0 cpu, 0.0 io}, id = 5123 LogicalProject(department_id=[$0]): rowcount = 12.0, cumulative cost = {24.0 rows, 25.0 cpu, 0.0 io}, id = 5169 EnumerableTableScan(table=[[foodmart2, department]]): rowcount = 12.0, cumulative cost = {12.0 rows, 13.0 cpu, 0.0 io}, id = 5125 LogicalAggregate(group=[{0}], EXPR$0=[AVG($1)]): rowcount = 115.5, cumulative cost = {2439.9375 rows, 3466.0 cpu, 0.0 io}, id = 5173 LogicalProject(store_id=[$6], salary=[$11]): rowcount = 1155.0, cumulative cost = {2310.0 rows, 3466.0 cpu, 0.0 io}, id = 5172 EnumerableTableScan(table=[[foodmart2, employee]]): rowcount = 1155.0, cumulative cost = {1155.0 rows, 1156.0 cpu, 0.0 io}, id = 5129 Sets: Set#0, ... ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services