You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Parth Chandra (JIRA)" <ji...@apache.org> on 2015/06/26 02:56:05 UTC

[jira] [Updated] (DRILL-3382) CTAS with order by clause fails with IOOB exception

     [ https://issues.apache.org/jira/browse/DRILL-3382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Parth Chandra updated DRILL-3382:
---------------------------------
    Fix Version/s: 1.1.0

> CTAS with order by clause fails with IOOB exception
> ---------------------------------------------------
>
>                 Key: DRILL-3382
>                 URL: https://issues.apache.org/jira/browse/DRILL-3382
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>    Affects Versions: 1.1.0
>            Reporter: Parth Chandra
>            Assignee: Aman Sinha
>            Priority: Critical
>             Fix For: 1.1.0
>
>
> The query :
> {panel}
> create table `lineitem__5`  as select l_suppkey, l_partkey, l_linenumber from cp.`tpch/lineitem.parquet` l order by l_linenumber;
> {panel}
> fails with an IOOB exception
> Trace in log - 
> {panel}
> [Error Id: 3351dcf3-032f-4d10-b2a4-c42959d0c06a on localhost:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: IndexOutOfBoundsException: index (2) must be less than size (2)
> [Error Id: 3351dcf3-032f-4d10-b2a4-c42959d0c06a on localhost:31010]
>     at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:523) ~[drill-common-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:737) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:839) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:781) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) [drill-common-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:783) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:892) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:253) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
>     at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
> Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment initialization: Internal error: Error while applying rule ExpandConversionRule, args [rel#9013:AbstractConverter.PHYSICAL.SINGLETON([]).[2](input=rel#9011:Subset#7.PHYSICAL.ANY([]).[2],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[2])]
>     ... 4 common frames omitted
> Caused by: java.lang.AssertionError: Internal error: Error while applying rule ExpandConversionRule, args [rel#9013:AbstractConverter.PHYSICAL.SINGLETON([]).[2](input=rel#9011:Subset#7.PHYSICAL.ANY([]).[2],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[2])]
>     at org.apache.calcite.util.Util.newInternal(Util.java:790) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:795) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:303) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:316) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToPrel(DefaultSqlHandler.java:260) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.convertToPrel(CreateTableHandler.java:120) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan(CreateTableHandler.java:99) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:178) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:903) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:242) [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>     ... 3 common frames omitted
> Caused by: java.lang.IndexOutOfBoundsException: index (2) must be less than size (2)
>     at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:305) ~[guava-14.0.1.jar:na]
>     at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:284) ~[guava-14.0.1.jar:na]
>     at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:81) ~[guava-14.0.1.jar:na]
>     at org.apache.calcite.rex.RexBuilder.makeInputRef(RexBuilder.java:768) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.rel.core.Sort.<init>(Sort.java:103) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.rel.logical.LogicalSort.<init>(LogicalSort.java:37) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.rel.logical.LogicalSort.create(LogicalSort.java:63) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:79) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:39) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1180) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1272) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.AbstractConverter$ExpandConversionRule.onMatch(AbstractConverter.java:115) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
>     ... 12 common frames omitted
> {panel}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)