You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Phabricator (JIRA)" <ji...@apache.org> on 2013/02/05 19:46:11 UTC
[jira] [Updated] (HIVE-701) lots of reserved keywords in hive
[ https://issues.apache.org/jira/browse/HIVE-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HIVE-701:
-----------------------------
Attachment: HIVE-701.D8397.1.patch
sxyuan requested code review of "HIVE-701 [jira] Make keywords non-reserved".
Reviewers: kevinwilfong, JIRA
Almost all keywords in Hive are reserved. This change makes all but the following keywords non-reserved:
IF, HAVING, WHERE, SELECT, UNIQUEJOIN, JOIN, ON, TRANSFORM, MAP, REDUCE, TABLESAMPLE, CAST, FUNCTION, EXTENDED, FORMATTED, PRETTY, CASE, WHEN, THEN, ELSE, END, DATABASE, CROSS
Because the grammar grew too large, it was split into multiple files to accommodate Java's code size limit. As a result, the custom error handling needed to be moved as well.
TEST PLAN
Use keywords as identifiers in test queries. Existing unit tests should ensure that keywords will not be mistakenly identified as identifiers.
REVISION DETAIL
https://reviews.facebook.net/D8397
AFFECTED FILES
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
ql/src/test/results/clientnegative/show_tables_bad1.q.out
ql/src/test/results/clientnegative/archive_partspec3.q.out
ql/src/test/results/clientnegative/invalid_create_tbl2.q.out
ql/src/test/results/clientnegative/select_udtf_alias.q.out
ql/src/test/results/clientnegative/show_tables_bad2.q.out
ql/src/test/results/clientnegative/invalid_tbl_name.q.out
ql/src/test/results/clientnegative/lateral_view_join.q.out
ql/src/test/results/clientpositive/nonreserved_keywords_input37.q.out
ql/src/test/results/clientpositive/nonreserved_keywords_insert_into1.q.out
ql/src/test/results/compiler/errors/wrong_distinct2.q.out
ql/src/test/results/compiler/errors/missing_overwrite.q.out
ql/src/test/queries/clientnegative/show_tables_bad1.q
ql/src/test/queries/clientnegative/show_tables_bad2.q
ql/src/test/queries/clientpositive/nonreserved_keywords_insert_into1.q
ql/src/test/queries/clientpositive/nonreserved_keywords_input37.q
ql/src/java/org/apache/hadoop/hive/ql/parse/FromClauseParser.g
ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
ql/src/java/org/apache/hadoop/hive/ql/parse/SelectClauseParser.g
ql/src/java/org/apache/hadoop/hive/ql/parse/ParseDriver.java
ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
ql/build.xml
To: JIRA
> lots of reserved keywords in hive
> ---------------------------------
>
> Key: HIVE-701
> URL: https://issues.apache.org/jira/browse/HIVE-701
> Project: Hive
> Issue Type: New Feature
> Components: Query Processor
> Reporter: Namit Jain
> Assignee: Samuel Yuan
> Attachments: HIVE-701.D8397.1.patch
>
>
> There is a problem if we want to use some reserved keywords:
> for example, creating a function of name left/right ? left/right is already a reserved keyword.
> The other way around should also be possible - if we want to add a 'show tables status' and some applications already use status as a column name, they should not break
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira