GitHub user bomeng opened a pull request:

    https://github.com/apache/spark/pull/12191

    [SPARK-14398] [SQL] Audit non-reserved keyword list in ANTLR4 parser

    ## What changes were proposed in this pull request?
    
    I have compared non-reserved list in Antlr3 and Antlr4 one by one, added 
the missing non-reserved that were defined in Antlr3 to the new Antlr4 file.
    
    The keywords related to data types are not added, here is the list:
    `KW_LONG, KW_STRING, KW_STRUCT, KW_TINYINT, KW_UNIONTYPE, KW_UNSIGNED
    `
    
    The keywords related to time/date are added to Antlr4, here is the list:
    `KW_DAY, KW_DATETIME, KW_HOUR, KW_YEAR, KW_UTC, KW_UTCTIMESTAMP
    `
    
    The keywords that were introduced in Antlr3 but not the official keywords, 
are not added to Antlr4 for now, here is the list:
    `KW_ANTI, KW_WEEK, KW_MILLISECOND, KW_MICROSECOND, KW_CLEAR, KW_LAZY, 
KW_CACHE, KW_UNCACHE, KW_DFS
     `
    
    Any recommendation for the above is welcome. 
    
    ## How was this patch tested?
    
    I manually checked the keywords one by one. Please let me know if there is 
a better way to test.
    
    Another thought: I suggest to put all the keywords definition and 
non-reserved list in order, that will be much easier to check in the future. 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bomeng/spark SPARK-14398

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12191.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12191
    
----
commit 0f26a6a0be9bb81dc400f57d10520ac2aea290c5
Author: bomeng <[email protected]>
Date:   2016-04-06T00:19:35Z

    update non-reserved list

commit 5c130bad14cdbc3fdbe30c268a91bbc6a5b07e85
Author: bomeng <[email protected]>
Date:   2016-04-06T00:36:45Z

    add value type

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to