hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Francke (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-4933) Document how aliases work with the OVER clause
Date Wed, 30 Jul 2014 08:44:38 GMT

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

Lars Francke updated HIVE-4933:
-------------------------------

    Summary: Document how aliases work with the OVER clause  (was: Can't use alias directly
before OVER clause)

> Document how aliases work with the OVER clause
> ----------------------------------------------
>
>                 Key: HIVE-4933
>                 URL: https://issues.apache.org/jira/browse/HIVE-4933
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.11.0
>            Reporter: Lars Francke
>            Priority: Minor
>
> {code}
> CREATE TABLE test (foo INT);
> hive> SELECT SUM(foo) AS bar OVER (PARTITION BY foo) FROM test;
> MismatchedTokenException(175!=110)
> 	at org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:617)
> 	at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.fromClause(HiveParser_FromClauseParser.java:1424)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.fromClause(HiveParser.java:35998)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.selectStatement(HiveParser.java:33974)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.regular_body(HiveParser.java:33882)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatement(HiveParser.java:33389)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:33169)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1284)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:983)
> 	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:190)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:434)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:352)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:995)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1038)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:921)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:422)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:790)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:684)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:623)
> 	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.main(RunJar.java:212)
> FAILED: ParseException line 1:20 mismatched input 'OVER' expecting FROM near 'bar' in
from clause{code}
> The same happens without the {{AS}} but it works when leaving out the alias entirely.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message