drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aman Sinha (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1978) Using order by with a cast function and array index fails to plan.
Date Fri, 03 Apr 2015 22:57:53 GMT

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

Aman Sinha updated DRILL-1978:
------------------------------
    Assignee: Sean Hsuan-Yi Chu  (was: Aman Sinha)

> Using order by with a cast function and array index fails to plan.
> ------------------------------------------------------------------
>
>                 Key: DRILL-1978
>                 URL: https://issues.apache.org/jira/browse/DRILL-1978
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Jacques Nadeau
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 0.9.0
>
>
> {code}
> CREATE TABLE newStar AS 
> SELECT 
>   columns[0], columns[1], columns[2], columns[3], columns[4], columns[5], 
>   columns[6], columns[7], columns[8], columns[9], columns[10], columns[11], 
>   columns[12], columns[13], columns[14], columns[15]
> FROM dfs.`file.csv` ORDER BY cast(columns[2] as int);
> {code}
> {code}
> org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: Internal error: Error while applying rule ExpandConversionRule, args [rel#98:AbstractConverter.PHYSICAL.ANY([]).[16](child=rel#79:Subset#9.PHYSICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=ANY([]),sort=[16])]
> 	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:194) [classes/:na]
> 	at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
~[classes/:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
> 	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> Caused by: java.lang.AssertionError: Internal error: Error while applying rule ExpandConversionRule,
args [rel#98:AbstractConverter.PHYSICAL.ANY([]).[16](child=rel#79:Subset#9.PHYSICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=ANY([]),sort=[16])]
> 	at org.eigenbase.util.Util.newInternal(Util.java:750) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:246) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661)
~[optiq-core-0.9-drill-r16.jar:na]
> 	at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:273) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToPrel(DefaultSqlHandler.java:167)
~[classes/:na]
> 	at org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan(CreateTableHandler.java:112)
~[classes/:na]
> 	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[classes/:na]
> 	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:507) [classes/:na]
> 	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:185) [classes/:na]
> 	at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
~[classes/:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
> 	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> 	... 4 more
> Caused by: java.lang.IndexOutOfBoundsException: index (16) must be less than size (16)
> 	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.eigenbase.rex.RexBuilder.makeInputRef(RexBuilder.java:764) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.rel.SortRel.<init>(SortRel.java:94) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.rel.SortRel.<init>(SortRel.java:59) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:78) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.rel.RelCollationTraitDef.convert(RelCollationTraitDef.java:1) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1011)
~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoPlanner.changeTraitsUsingConverters(VolcanoPlanner.java:1102)
~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.AbstractConverter$ExpandConversionRule.onMatch(AbstractConverter.java:108)
~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661)
~[optiq-core-0.9-drill-r16.jar:na]
> 	at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:273) ~[optiq-core-0.9-drill-r16.jar:na]
> 	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToPrel(DefaultSqlHandler.java:167)
~[classes/:na]
> 	at org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan(CreateTableHandler.java:112)
~[classes/:na]
> 	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[classes/:na]
> 	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:507) [classes/:na]
> 	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:185) [classes/:na]
> 	at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
~[classes/:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
> 	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
> 	... 12 more
> {code}



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

Mime
View raw message