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

Samuel Yuan commented on HIVE-4067:
-----------------------------------

The primary motivation was that it was tricky to add new keywords, which are 
almost always reserved words by default in Hive, because doing so could easily 
break existing queries. The changes for HIVE-701 make it easy to add 
non-reserved keywords in the future. HIVE-701 also removes the reserved status 
of most keywords, to prevent recently introduced keywords from breaking queries.

I can undo the changes for the Hive keywords which are reserved in SQL 2003, 
but would there be any reason to do so besides to adhere to the standard, given 
that the grammar can support leaving them non-reserved?
                
> Followup to HIVE-701: reduce ambiguity in grammar
> -------------------------------------------------
>
>                 Key: HIVE-4067
>                 URL: https://issues.apache.org/jira/browse/HIVE-4067
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.11.0
>            Reporter: Samuel Yuan
>            Assignee: Samuel Yuan
>            Priority: Minor
>         Attachments: HIVE-4067.D8883.1.patch
>
>
> After HIVE-701 the grammar has become much more ambiguous, and the 
> compilation generates a large number of warnings. Making FROM, DISTINCT, 
> PRESERVE, COLUMN, ALL, AND, OR, and NOT reserved keywords again reduces the 
> number of warnings to 134, up from the original 81 warnings but down from the 
> 565 after HIVE-701. Most of the remaining ambiguity is trivial, an example 
> being "KW_ELEM_TYPE | KW_KEY_TYPE | KW_VALUE_TYPE | identifier", and they are 
> all correctly handled by ANTLR.

--
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

Reply via email to