Khurram Faraaz created DRILL-4804:
-------------------------------------
Summary: need better error message rather than AssertionError
Key: DRILL-4804
URL: https://issues.apache.org/jira/browse/DRILL-4804
Project: Apache Drill
Issue Type: Bug
Components: Execution - Flow
Affects Versions: 1.8.0
Reporter: Khurram Faraaz
We need a better error message, today we only report an AssertionError to user.
When the GROUP BY in the outer query includes col7, query returns results,
without col7 in the GROUP BY clause is when we see the Assertion error.
{noformat}
0: jdbc:drill:schema=dfs.tmp> SELECT col1 ,col2 ,AVG(SUM(col2)) OVER windw,
LEAD(col2) OVER windw FROM (SELECT col0 , col1 , col2, col7 , NTILE(3) over
windw from `allTypsUniq.parquet` WINDOW windw as (PARTITION BY col7 ORDER BY
col0)) sub_query GROUP BY col1,col2 WINDOW windw as (PARTITION BY col7 ORDER BY
col0);
Error: SYSTEM ERROR: AssertionError
[Error Id: 990dcb90-b5d2-409d-be1f-7bcba76259d1 on centos-01.qa.lab:31010]
(state=,code=0)
{noformat}
stack trace from drillbit.log
{noformat}
2016-07-23 20:07:24,042 [286c3184-5890-e4ff-356b-d716f9286c81:foreman] INFO
o.a.drill.exec.work.foreman.Foreman - Query text for query id
286c3184-5890-e4ff-356b-d716f9286c81: SELECT col1 ,col2 ,AVG(SUM(col2)) OVER
windw, LEAD(col2) OVER windw FROM (SELECT col0 , col1 , col2, col7 , NTILE(3)
over windw from `allTypsUniq.parquet` WINDOW windw as (PARTITION BY col7 ORDER
BY col0)) sub_query GROUP BY col1,col2 WINDOW windw as (PARTITION BY col7 ORDER
BY col0)
2016-07-23 20:07:24,084 [286c3184-5890-e4ff-356b-d716f9286c81:foreman] ERROR
o.a.drill.exec.work.foreman.Foreman - SYSTEM ERROR: AssertionError
[Error Id: 990dcb90-b5d2-409d-be1f-7bcba76259d1 on centos-01.qa.lab:31010]
org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: AssertionError
[Error Id: 990dcb90-b5d2-409d-be1f-7bcba76259d1 on centos-01.qa.lab:31010]
at
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543)
~[drill-common-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:791)
[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:901)
[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:271)
[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_101]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_101]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_101]
Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected
exception during fragment initialization: null
... 4 common frames omitted
Caused by: java.lang.AssertionError: null
at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.getRootField(SqlToRelConverter.java:3928)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.adjustInputRef(SqlToRelConverter.java:3254)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:3229)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.access$1500(SqlToRelConverter.java:185)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4181)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:3603)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at org.apache.calcite.sql.SqlIdentifier.accept(SqlIdentifier.java:274)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4062)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertOver(SqlToRelConverter.java:1763)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.access$1100(SqlToRelConverter.java:185)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4055)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.createAggImpl(SqlToRelConverter.java:2575)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertAgg(SqlToRelConverter.java:2392)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:622)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:583)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2795)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:537)
~[calcite-core-1.4.0-drill-r14.jar:1.4.0-drill-r14]
at
org.apache.drill.exec.planner.sql.SqlConverter.toRel(SqlConverter.java:251)
~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel(DefaultSqlHandler.java:620)
~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:195)
~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:164)
~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:94)
~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:978)
[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:257)
[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
... 3 common frames omitted
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)