hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-16039) Calcite unsupported, and non-Calcite NPE on a query
Date Sat, 25 Feb 2017 03:07:44 GMT

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

Sergey Shelukhin reassigned HIVE-16039:
---------------------------------------


> Calcite unsupported, and non-Calcite NPE on a query
> ---------------------------------------------------
>
>                 Key: HIVE-16039
>                 URL: https://issues.apache.org/jira/browse/HIVE-16039
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Ashutosh Chauhan
>
> This happens on master even with   HIVE-15938 reverted (I was trying to make a test case
for it based on some TPCDS query).
> {noformat}
> drop table src_10;
> drop table src_20;
> drop table src_30;
> create table src_10 as select * from src limit 10;
> create table src_20 as select * from src limit 11;
> create table src_30 as select * from src limit 12;
> explain 
> with cross_items as
>  (select brand_id, class_id from src_30,
>     (select s1.key brand_id,s1.value class_id from src_10 s1
>      intersect select ics.key, ics.value from src_20 ics
>      intersect select iws.key, iws.value from src_30 iws) x where key = brand_id),
> avg_sales as
>  (select kv from (select value kv from src_10
>        union all select key from src_20
>        union all select value src_30) x)
>   select key, value
>  from (select 'foo' channel, key, value from src_10 where key in (select brand_id from
cross_items)
>    union all select 'bar' channel, key, value from src_20 where value in (select class_id
from cross_items)
>    union all select 'baz' channel, key, value from src_30 where value in (select kv from
avg_sales)
>  ) y;
> {noformat}
> I know this query is super intuitive...
> CalciteOptimizer fails in a non-informative way, and then SA NPEs.
> {noformat}
> org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: Unsupported
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3886)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3808)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3815)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3852)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3808)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3852)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3808)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3852)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genSubQueryRelNode(CalcitePlanner.java:2419)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genFilterRelNode(CalcitePlanner.java:2443)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genFilterLogicalPlan(CalcitePlanner.java:2499)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3898)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3808)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3815)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3852)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3808)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:3852)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1281)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1227)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113) ~[calcite-core-1.10.0.jar:1.10.0]
> 	at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:997)
~[calcite-core-1.10.0.jar:1.10.0]
> 	at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149) ~[calcite-core-1.10.0.jar:1.10.0]
> 	at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106) ~[calcite-core-1.10.0.jar:1.10.0]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1035)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:1051)
~[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:363)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11029)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:285)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:165)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
[hive-exec-2.2.0-SNAPSHOT.jar:2.2.0-SNAPSHOT]
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:514) [hive-exec-2.2.0-SNAPSHOT.jar:?]
> {noformat}
> and
> {noformat}
> 2017-02-24T19:02:51,593 ERROR [9e38d8ac-1473-4ecb-b4f0-1213180f1b07 main] ql.Driver:
FAILED: NullPointerException null
> java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9550)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10450)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10315)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10342)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10315)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10342)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10328)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlanForSubQueryPredicate(SemanticAnalyzer.java:3119)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:3215)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9502)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10450)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10315)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10318)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10318)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10342)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10315)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10342)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10328)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:11016)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:480)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11029)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:285)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
> 	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:165)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:514)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message