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

Pengcheng Xiong commented on HIVE-12157:
----------------------------------------

[~richarddu], I saw your new patch. It seems that you plan to support unicode 
in column name and also table names, right? If so, that means you go beyond 
your previous plan to support unicode alias in select-clause only, which is a 
good thing but you also need more test cases. (1) Shall we first create two 
sub-tasks, one for supporting unicode in table names and another one for 
supporting unicode in column names? We can then do it one by one.
(2) Could you add a configuration in HiveConf.java to control the support of 
unicode in table/column names? (3) Could you please follow what I did in 
HIVE-11699 for special_character_in_tabnames_1.q and 
special_character_in_tabnames_2.q and create your own test cases for unicode in 
table names? (4) Could you go to reviews.apache.org and create the view request 
for me? Thanks.

> select-clause doesn't support unicode alias
> -------------------------------------------
>
>                 Key: HIVE-12157
>                 URL: https://issues.apache.org/jira/browse/HIVE-12157
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>    Affects Versions: 1.2.1
>            Reporter: richard du
>            Assignee: richard du
>            Priority: Minor
>         Attachments: HIVE-12157.01.patch, HIVE-12157.patch
>
>
> Parser will throw exception when I use alias:
> 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)

Reply via email to