hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-15966) Query with column alias fails in order by
Date Mon, 20 Feb 2017 16:45:44 GMT

    [ https://issues.apache.org/jira/browse/HIVE-15966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15874790#comment-15874790
] 

Chaoyu Tang commented on HIVE-15966:
------------------------------------

Thanks, [~pxiong]. It looks like that my sample above does still not work with your patch.06
in HIVE-15160 when the hive.cbo.enable is disabled.  

> Query with column alias fails in order by
> -----------------------------------------
>
>                 Key: HIVE-15966
>                 URL: https://issues.apache.org/jira/browse/HIVE-15966
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>
> Query:  
> {code}
> select mtg.marketing_type_group_desc as marketing_type_group
> from marketing_type_group mtg 
> order by mtg.marketing_type_group_desc;
> {code}
> fails with error:
> {code}
> 2017-02-17T11:22:11,441 ERROR [eb89eafb-e100-42b1-8ff1-b3332b2e715f main]: ql.Driver
(SessionState.java:printError(1116)) - FAILED: SemanticException [Error 10004]: Line 7:9 Invalid
table alias or column reference 'marketing_type_group_desc': (possible column names are: marketing_type_group,
prod_type)
> org.apache.hadoop.hive.ql.parse.SemanticException: Line 7:9 Invalid table alias or column
reference 'marketing_type_group_desc': (possible column names are: marketing_type_group, prod_type)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:11501)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11449)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11417)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:11395)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genReduceSinkPlan(SemanticAnalyzer.java:7761)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:9655)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9554)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10450)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10328)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:11011)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:478)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11022)
> 	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.Driver.compile(Driver.java:514)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1319)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1459)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1239)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1229)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:184)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {code}



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

Mime
View raw message