[
https://issues.apache.org/jira/browse/HIVE-12707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15070272#comment-15070272
]
Rajit Saha commented on HIVE-12707:
-----------------------------------
Actually in hive 0.14.0.2.2.6.0-2800 , I could create the table with INTERVAL
column name without backtic
{noformat}
$ hive
Logging initialized using configuration in
file:/etc/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/usr/hdp/2.2.6.0-2800/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/usr/hdp/2.2.6.0-2800/hive/lib/hive-jdbc-0.14.0.2.2.6.0-2800-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
hive> create table testinterval_test ( INTERVAL int);
OK
Time taken: 1.084 seconds
{noformat}
But in Hive 1.2.1 it fails
{noformat}
hive> set hive.support.sql11.reserved.keywords = false;
hive> create table testinterval ( INTERVAL int);
NoViableAltException(142@[])
at
org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.identifier(HiveParser_IdentifiersParser.java:11576)
...
FAILED: ParseException line 1:28 cannot recognize input near 'INTERVAL' 'int'
')' in column specification
hive> set hive.support.sql11.reserved.keywords = true;
hive> create table testinterval ( INTERVAL int);
NoViableAltException(142@[])
...
FAILED: ParseException line 1:28 cannot recognize input near 'INTERVAL' 'int'
')' in column specification
{noformat}
> ParseException for column name 'INTERVAL', even set
> hive.support.sql11.reserved.keywords = false
> -------------------------------------------------------------------------------------------------
>
> Key: HIVE-12707
> URL: https://issues.apache.org/jira/browse/HIVE-12707
> Project: Hive
> Issue Type: Bug
> Affects Versions: 1.2.1
> Reporter: Rajit Saha
> Assignee: Pengcheng Xiong
> Fix For: 1.2.1
>
>
> Any column name INTERVAL is causing ParseException , even we set
> hive.support.sql11.reserved.keywords = false
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)