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

mathias kluba commented on HIVE-6013:
-------------------------------------

Hi,

I was using Hive 0.14 and not migrated to Hive 1.2.1
I'm using the "org.openx.data.jsonserde.JsonSerDe" and I have a JSON field with 
a space in the end.
To make it works with the SerDe, I created the table with a space in the column 
name using back-ticks:
CREATE EXTERNAL TABLE test (`MY_FIELD_WITH_SPACE_IN_THE_END ` STRING)
...

It was working on Hive 0.14, but it works no more on Hive 1.2.1: When I do 
"SELECT `MY_FIELD_WITH_SPACE_IN_THE_END `" it says that the column doesn't 
exist, I can query the column without the space but it's null because it 
doesn't match the JSON field.
Spaces in the middle of the column name are taking to account, but not in the 
end (didn't tested at the beginning)

Is it a bug / regression in 1.2.1 ?

> Supporting Quoted Identifiers in Column Names
> ---------------------------------------------
>
>                 Key: HIVE-6013
>                 URL: https://issues.apache.org/jira/browse/HIVE-6013
>             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 doc.
> 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
(v6.3.4#6332)

Reply via email to