hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-2267) Can't use first as a column name
Date Wed, 06 Jul 2011 21:13:16 GMT
Can't use first as a column name
--------------------------------

                 Key: HIVE-2267
                 URL: https://issues.apache.org/jira/browse/HIVE-2267
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.7.1, 0.7.0
            Reporter: Jakob Homan
            Priority: Minor


Attempting to create a table with a column named {{first}} fails:
{noformat}hive> create table foo(first int);
FAILED: Parse Error: line 1:17 mismatched input 'first' expecting Identifier near '(' in column
specification             
11/07/06 14:07:36 ERROR ql.Driver: FAILED: Parse Error: line 1:17 mismatched input 'first'
expecting Identifier near '(' in column specification                           
org.apache.hadoop.hive.ql.parse.ParseException: line 1:17 mismatched input 'first' expecting
Identifier near '(' in column specification                                              
  
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:438){noformat}
This is because ALTER TABLE reserves first as a keyword as part of its column moving operation,
and hence {{first}} is tokenized as KW_FIRST rather than an identifier.  

This is unfortunate as first is a reasonable column name one may wish to use.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message