Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6.0
Description
Window function query results in IllegalStateException
Drill 1.6.0 commit ID: 6d5f4983
0: jdbc:drill:schema=dfs.tmp> SELECT . . . . . . . . . . . . . . > RANK() OVER (ORDER BY c1 DESC), . . . . . . . . . . . . . . > AVG(c3) OVER (PARTITION BY c8 ORDER BY MIN(c3) DESC NULLS FIRST RANGE BETWEEN CURRENT ROW AND CURRENT ROW) . . . . . . . . . . . . . . > FROM dfs.tmp.`t_alltype` . . . . . . . . . . . . . . > WINDOW w AS (PARTITION BY c8 ORDER BY c2 DESC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING); Error: SYSTEM ERROR: IllegalStateException: This generator does not support mappings beyond Fragment 0:0 [Error Id: a273f3c1-47a7-450b-b9d7-65c2608089d5 on centos-03.qa.lab:31010] (state=,code=0)
Stack trace from drillbit.log
2016-02-26 11:25:32,925 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:foreman] INFO o.a.drill.exec.work.foreman.Foreman - Query text for query id 292fc9d3-28f5-6eb0-ec6a-99d5b90ec968: SELECT RANK() OVER (ORDER BY c1 DESC), AVG(c3) OVER (PARTITION BY c8 ORDER BY MIN(c3) DESC NULLS FIRST RANGE BETWEEN CURRENT ROW AND CURRENT ROW) FROM dfs.tmp.`t_alltype` WINDOW w AS (PARTITION BY c8 ORDER BY c2 DESC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) 2016-02-26 11:25:33,056 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:foreman] INFO o.a.d.exec.store.parquet.Metadata - Took 1 ms to get file statuses 2016-02-26 11:25:33,059 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:foreman] INFO o.a.d.exec.store.parquet.Metadata - Fetch parquet metadata: Executed 1 out of 1 using 1 threads. Time: 2ms total, 2.395101ms avg, 2ms max. 2016-02-26 11:25:33,059 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:foreman] INFO o.a.d.exec.store.parquet.Metadata - Fetch parquet metadata: Executed 1 out of 1 using 1 threads. Earliest start: 1.325000 μs, Latest start: 1.325000 μs, Average start: 1.325000 μs . 2016-02-26 11:25:33,059 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:foreman] INFO o.a.d.exec.store.parquet.Metadata - Took 2 ms to read file metadata 2016-02-26 11:25:33,130 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:frag:0:0] INFO o.a.d.e.w.fragment.FragmentExecutor - 292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:0:0: State change requested AWAITING_ALLOCATION --> RUNNING 2016-02-26 11:25:33,130 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:frag:0:0] INFO o.a.d.e.w.f.FragmentStatusReporter - 292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:0:0: State to report: RUNNING 2016-02-26 11:25:33,151 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:frag:0:0] INFO o.a.d.e.w.fragment.FragmentExecutor - 292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:0:0: State change requested RUNNING --> FAILED 2016-02-26 11:25:33,151 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:frag:0:0] INFO o.a.d.e.w.fragment.FragmentExecutor - 292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:0:0: State change requested FAILED --> FINISHED 2016-02-26 11:25:33,152 [292fc9d3-28f5-6eb0-ec6a-99d5b90ec968:frag:0:0] ERROR o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR: IllegalStateException: This generator does not support mappings beyond Fragment 0:0 [Error Id: a273f3c1-47a7-450b-b9d7-65c2608089d5 on centos-03.qa.lab:31010] org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: IllegalStateException: This generator does not support mappings beyond Fragment 0:0 [Error Id: a273f3c1-47a7-450b-b9d7-65c2608089d5 on centos-03.qa.lab:31010] at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543) ~[drill-common-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:318) [drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:185) [drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:287) [drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65] Caused by: java.lang.IllegalStateException: This generator does not support mappings beyond at org.apache.drill.exec.compile.sig.MappingSet.enterChild(MappingSet.java:102) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitFunctionHolderExpression(EvaluationVisitor.java:189) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitFunctionHolderExpression(EvaluationVisitor.java:1078) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$CSEFilter.visitFunctionHolderExpression(EvaluationVisitor.java:816) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$CSEFilter.visitFunctionHolderExpression(EvaluationVisitor.java:796) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.common.expression.FunctionHolderExpression.accept(FunctionHolderExpression.java:47) ~[drill-logical-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitValueVectorWriteExpression(EvaluationVisitor.java:360) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitUnknown(EvaluationVisitor.java:342) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitUnknown(EvaluationVisitor.java:1328) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$CSEFilter.visitUnknown(EvaluationVisitor.java:1027) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor$CSEFilter.visitUnknown(EvaluationVisitor.java:796) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.ValueVectorWriteExpression.accept(ValueVectorWriteExpression.java:64) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.EvaluationVisitor.addExpr(EvaluationVisitor.java:105) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.expr.ClassGenerator.addExpr(ClassGenerator.java:227) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:427) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:78) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.xsort.ExternalSortBatch.buildSchema(ExternalSortBatch.java:236) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.window.WindowFrameRecordBatch.buildSchema(WindowFrameRecordBatch.java:226) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:104) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:81) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:94) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:257) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:251) ~[drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_65] at javax.security.auth.Subject.doAs(Subject.java:422) ~[na:1.8.0_65] at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595) ~[hadoop-common-2.7.0-mapr-1506.jar:na] at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:251) [drill-java-exec-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] ... 4 common frames omitted