hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel C Balan (JIRA)" <>
Subject [jira] [Commented] (HIVE-6013) Supporting Quoted Identifiers in Column Names
Date Wed, 02 Sep 2015 14:28:45 GMT


Gabriel C Balan commented on HIVE-6013:

Should commas be allowed inside quoted (back-tick-ed) column names? 

It seems I am able to create a table with commas in the name of the *last* column, but queries
naming the column explicitly don't work.

hive> set;

hive> create table t1(`a,` string);
Time taken: 0.245 seconds
hive> create table t2(`a,` string, b string);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe:
columns has 3 elements while columns.types has 2 elements!)

hive> describe t1;
a,                      string
Time taken: 0.698 seconds, Fetched: 1 row(s)

hive> select `a,` from t1;
FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or column reference
'a,': (possible column names are: a)

> Supporting Quoted Identifiers in Column Names
> ---------------------------------------------
>                 Key: HIVE-6013
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Harish Butani
>            Assignee: Harish Butani
>             Fix For: 0.13.0
>         Attachments: HIVE-6013.1.patch, HIVE-6013.2.patch, HIVE-6013.3.patch, HIVE-6013.4.patch,
HIVE-6013.5.patch, HIVE-6013.6.patch, HIVE-6013.7.patch, QuotedIdentifier.html
> Hive's current behavior on Quoted Identifiers is different from the normal interpretation.
Quoted Identifier (using backticks) has a special interpretation for Select expressions(as
Regular Expressions). Have documented current behavior and proposed a solution in attached
> Summary of solution is:
> - Introduce 'standard' quoted identifiers for columns only. 
> - At the langauage level this is turned on by a flag.
> - At the metadata level we relax the constraint on column names.

This message was sent by Atlassian JIRA

View raw message