[GitHub] vlsi edited a comment on issue #1024: [CALCITE-2817] Make CannotPlanException great

2019-02-12 Thread GitBox
vlsi edited a comment 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]]): 

[GitHub] vlsi edited a comment on issue #1024: [CALCITE-2817] Make CannotPlanException great

2019-02-12 Thread GitBox
vlsi edited a comment on issue #1024: [CALCITE-2817] Make CannotPlanException 
great
URL: https://github.com/apache/calcite/pull/1024#issuecomment-462919545
 
 
   ```
   There are not enough rules to produce a node with desired properties: 
convention=ENUMERABLE, sort=[].
   Missing conversions are LogicalAggregate[convention: NONE -> ENUMERABLE] (3 
cases)
   There are 3 empty subsets:
   Empty subset 0: rel#2417:Subset#3.ENUMERABLE.[], the relevant part of the 
original plan is as follows
   2312:LogicalAggregate(group=[{}], agg#0=[COUNT()], agg#1=[COUNT($0)])
 2246:LogicalValues(subset=[rel#2311:Subset#2.NONE.[0]], tuples=[[{ 1 }, { 
2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12 }, { 
13 }, { 14 }, { 15 }, { 16 }, { 17 }, { 18 }, { 19 }, { 20 }, { 21 }, { 22 }, { 
23 }, { 24 }, { 25 }]])
   
   Empty subset 1: rel#2424:Subset#10.ENUMERABLE.[], the relevant part of the 
original plan is as follows
   2326:LogicalAggregate(group=[{0, 1}])
 2324:LogicalProject(subset=[rel#2325:Subset#9.NONE.[]], empid=[$0], 
i=[true])
   2245:EnumerableTableScan(subset=[rel#2308:Subset#0.ENUMERABLE.[]], 
table=[[hr, emps]])
   
   Empty subset 2: rel#2420:Subset#7.ENUMERABLE.[], the relevant part of the 
original plan is as follows
   2320:LogicalAggregate(group=[{0}], agg#0=[MIN($1)])
 2318:LogicalProject(subset=[rel#2319:Subset#6.NONE.[0]], ROW_VALUE=[$0], 
$f1=[true])
   2246:LogicalValues(subset=[rel#2311:Subset#2.NONE.[0]], tuples=[[{ 1 }, 
{ 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12 }, 
{ 13 }, { 14 }, { 15 }, { 16 }, { 17 }, { 18 }, { 19 }, { 20 }, { 21 }, { 22 }, 
{ 23 }, { 24 }, { 25 }]])
   
   Root: rel#2346:Subset#13.ENUMERABLE.[]
   Original rel:
   LogicalProject(empid=[$0]): rowcount = 11.111494198158239, cumulative cost = 
{1013.6686957057293 rows, 1142.89540136869 cpu, 0.0 io}, id = 2307
 LogicalFilter(condition=[AND(OR(IS NOT NULL($7), CAST(OR(AND(IS NOT 
NULL($5), <>($1, 0)), AND(<($2, $1), null, <>($1, 0), IS NULL($5:BOOLEAN 
NOT NULL), OR(=($0, 100), =($0, 200), =($0, 150)))]): rowcount = 
11.111494198158239, cumulative cost = {1002.5572015075711 rows, 
1131.7839071705318 cpu, 0.0 io}, id = 2305
   LogicalJoin(condition=[=($0, $6)], joinType=[left]): rowcount = 
177.78390717053182, cumulative cost = {991.4457073094129 rows, 954.0 cpu, 0.0 
io}, id = 2304
 LogicalJoin(condition=[=($3, $4)], joinType=[left]): rowcount = 
118.52260478035456, cumulative cost = {603.6618001388811 rows, 653.0 cpu, 0.0 
io}, id = 2300
   LogicalProject(empid=[$0], $f0=[$1], $f1=[$2], empid0=[$0]): 
rowcount = 100.0, cumulative cost = {426.25 rows, 602.0 cpu, 0.0 io}, id = 2299
 LogicalJoin(condition=[true], joinType=[inner]): rowcount = 100.0, 
cumulative cost = {326.25 rows, 202.0 cpu, 0.0 io}, id = 2298
   LogicalProject(empid=[$0]): rowcount = 100.0, cumulative cost = 
{200.0 rows, 201.0 cpu, 0.0 io}, id = 2296
 EnumerableTableScan(table=[[hr, emps]]): rowcount = 100.0, 
cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 2245
   LogicalAggregate(group=[{}], agg#0=[COUNT()], 
agg#1=[COUNT($0)]): rowcount = 1.0, cumulative cost = {26.25 rows, 1.0 cpu, 0.0 
io}, id = 2297
 LogicalValues(tuples=[[{ 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 
}, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12 }, { 13 }, { 14 }, { 15 }, { 16 }, 
{ 17 }, { 18 }, { 19 }, { 20 }, { 21 }, { 22 }, { 23 }, { 24 }, { 25 }]]): 
rowcount = 25.0, cumulative cost = {25.0 rows, 1.0 cpu, 0.0 io}, id = 2246
   LogicalAggregate(group=[{0}], agg#0=[MIN($1)]): rowcount = 
7.901506985356971, cumulative cost = {58.88919535852659 rows, 51.0 cpu, 0.0 
io}, id = 2272
 LogicalProject(ROW_VALUE=[$0], $f1=[true]): rowcount = 25.0, 
cumulative cost = {50.0 rows, 51.0 cpu, 0.0 io}, id = 2270
   LogicalValues(tuples=[[{ 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 }, 
{ 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12 }, { 13 }, { 14 }, { 15 }, { 16 }, { 
17 }, { 18 }, { 19 }, { 20 }, { 21 }, { 22 }, { 23 }, { 24 }, { 25 }]]): 
rowcount = 25.0, cumulative cost = {25.0 rows, 1.0 cpu, 0.0 io}, id = 2246
 LogicalAggregate(group=[{0, 1}]): rowcount = 10.0, cumulative cost = 
{210.0 rows, 301.0 cpu, 0.0 io}, id = 2303
   LogicalProject(empid=[$0], i=[true]): rowcount = 100.0, cumulative 
cost = {200.0 rows, 301.0 cpu, 0.0 io}, id = 2302
 EnumerableTableScan(table=[[hr, emps]]): rowcount = 100.0, 
cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 2254
   
   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