drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-1563) IndexOutOfBoundException during change traits when aggregating over subquery with order-by
Date Thu, 22 Jan 2015 19:53:34 GMT

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

Jinfeng Ni resolved DRILL-1563.
-------------------------------
    Resolution: Fixed

> IndexOutOfBoundException during change traits when aggregating over subquery with order-by

> -------------------------------------------------------------------------------------------
>
>                 Key: DRILL-1563
>                 URL: https://issues.apache.org/jira/browse/DRILL-1563
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.6.0
>            Reporter: Aman Sinha
>            Assignee: Jinfeng Ni
>             Fix For: 0.8.0
>
>
> On TPCH SF1, doing a plain aggregation on top of a subquery that does order-by of 2 or
more columns gives IOBE.  This happens during planning, when processing traits.  See below.

> 0: jdbc:drill:zk=local> select count(*) from (select o_orderkey, o_custkey from orders
order by o_orderkey, o_custkey);
> Query failed: Failure while setting up Foreman. index (1) must be less than size (1)

> Query failed: Failure while setting up Foreman. index (1) must be less than size (1)
[4f2cc753-655e-47a1-a8f0-38e62eb79a2b]
> Here's the stack trace: 
> java.lang.IndexOutOfBoundsException: index (1) must be less than size (1)
> 	com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:305) ~[guava-14.0.1.jar:na]
> 	com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:284) ~[guava-14.0.1.jar:na]
> 	com.google.common.collect.SingletonImmutableList.get(SingletonImmutableList.java:45)
~[guava-14.0.1.jar:na]
> 	org.eigenbase.rex.RexBuilder.makeInputRef(RexBuilder.java:764) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.rel.SortRel.<init>(SortRel.java:94) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.rel.SortRel.<init>(SortRel.java:59) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:77) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:36) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.relopt.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1010)
~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.relopt.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1102)
~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.relopt.volcano.AbstractConverter$ExpandConversionRule.onMatch(AbstractConverter.java:107)
~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661) ~[optiq-core-0.9-drill-r4.jar:na]
> 	net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) ~[optiq-core-0.9-drill-r4.jar:na]
> 	net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:273) ~[optiq-core-0.9-drill-r4.jar:na]
> 	org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToPrel(DefaultSqlHandler.java:165)
~[drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:134)
~[drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:132) ~[drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:425) ~[drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:219) ~[drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:250) [drill-java-exec-0.6.0-incubating-rebuffed.jar:0.6.0-incubating]
> 	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
> 	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
> 	java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]



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

Mime
View raw message