hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Sankar Sivarama Subramaniyan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-12570) Incorrect error message Expression not in GROUP BY key thrown instead of Invalid function
Date Mon, 14 Dec 2015 19:17:46 GMT

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

Hari Sankar Sivarama Subramaniyan updated HIVE-12570:
-----------------------------------------------------
    Attachment: HIVE-12570.5.patch

> Incorrect error message Expression not in GROUP BY key thrown instead of Invalid function
> -----------------------------------------------------------------------------------------
>
>                 Key: HIVE-12570
>                 URL: https://issues.apache.org/jira/browse/HIVE-12570
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Hari Sankar Sivarama Subramaniyan
>            Assignee: Hari Sankar Sivarama Subramaniyan
>         Attachments: HIVE-12570.1.patch, HIVE-12570.2.patch, HIVE-12570.3.patch, HIVE-12570.4.patch,
HIVE-12570.5.patch
>
>
> {code}
> explain create table avg_salary_by_supervisor3 as select average(key) as key_avg from
src group by value;
> {code}
> We get the following stack trace :
> {code}
> FAILED: SemanticException [Error 10025]: Line 1:57 Expression not in GROUP BY key 'key'
> ERROR ql.Driver: FAILED: SemanticException [Error 10025]: Line 1:57 Expression not in
GROUP BY key 'key'
> org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:57 Expression not in GROUP
BY key 'key'
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10484)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10432)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3824)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSelectPlan(SemanticAnalyzer.java:3603)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:8862)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8817)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9668)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9561)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10053)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:345)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10064)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:222)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:237)
> 	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:74)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:237)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:462)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:317)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1227)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1276)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1152)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1140)
> 	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:400)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:778)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:717)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:645)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {code}
> Instead of the above error message, it be more appropriate to throw the below error :
> ERROR ql.Driver: FAILED: SemanticException [Error 10011]: Line 1:58 Invalid function
'average'



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

Mime
View raw message