hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "richard du (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-12157) select-clause doesn't support unicode alias
Date Tue, 13 Oct 2015 06:47:05 GMT
richard du created HIVE-12157:
---------------------------------

             Summary: select-clause doesn't support unicode alias
                 Key: HIVE-12157
                 URL: https://issues.apache.org/jira/browse/HIVE-12157
             Project: Hive
          Issue Type: Improvement
          Components: hpl/sql
    Affects Versions: 1.2.1
            Reporter: richard du
            Priority: Trivial


Parser will throw exception when I use alias in the selected column:
hive> desc test;
OK
a                       int                                         
b                       string                                      
Time taken: 0.135 seconds, Fetched: 2 row(s)
hive> select a as 行1 from test limit 10;
NoViableAltException(302@[134:7: ( ( ( KW_AS )? identifier ) | ( KW_AS LPAREN identifier (
COMMA identifier )* RPAREN ) )?])
        at org.antlr.runtime.DFA.noViableAlt(DFA.java:158)
        at org.antlr.runtime.DFA.predict(DFA.java:116)
        at org.apache.hadoop.hive.ql.parse.HiveParser_SelectClauseParser.selectItem(HiveParser_SelectClauseParser.java:2915)
        at org.apache.hadoop.hive.ql.parse.HiveParser_SelectClauseParser.selectList(HiveParser_SelectClauseParser.java:1373)
        at org.apache.hadoop.hive.ql.parse.HiveParser_SelectClauseParser.selectClause(HiveParser_SelectClauseParser.java:1128)
        at org.apache.hadoop.hive.ql.parse.HiveParser.selectClause(HiveParser.java:45827)
        at org.apache.hadoop.hive.ql.parse.HiveParser.selectStatement(HiveParser.java:41495)
        at org.apache.hadoop.hive.ql.parse.HiveParser.regularBody(HiveParser.java:41402)
        at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpressionBody(HiveParser.java:40413)
        at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:40283)
        at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1590)
        at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1109)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:396)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:308)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1122)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1170)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
        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)
FAILED: ParseException line 1:13 cannot recognize input near 'as' '1' 'from' in selection
target



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

Mime
View raw message