diff options
author | bomeng <bmeng@us.ibm.com> | 2016-04-19 09:09:58 +0200 |
---|---|---|
committer | Herman van Hovell <hvanhovell@questtec.nl> | 2016-04-19 09:09:58 +0200 |
commit | 74fe235ab5ed169fb30d9d2c04077b90d1bf1b95 (patch) | |
tree | 634f5716ec1025f39b374077cc23fae4fb7e969e | |
parent | d4b94ead92177a18d78a9701cfde9979641d2a18 (diff) | |
download | spark-74fe235ab5ed169fb30d9d2c04077b90d1bf1b95.tar.gz spark-74fe235ab5ed169fb30d9d2c04077b90d1bf1b95.tar.bz2 spark-74fe235ab5ed169fb30d9d2c04077b90d1bf1b95.zip |
[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 as well as all the existing keywords defined in Antlr4, added the missing keywords to the non-reserved keywords list. If we need to support more syntax, we can add more keywords by then.
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.
Author: bomeng <bmeng@us.ibm.com>
Closes #12191 from bomeng/SPARK-14398.
-rw-r--r-- | sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 index 9cf2dd257e..6f104a1489 100644 --- a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 +++ b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 @@ -652,6 +652,7 @@ nonReserved | STATISTICS | ANALYZE | PARTITIONED | EXTERNAL | DEFINED | RECORDWRITER | REVOKE | GRANT | LOCK | UNLOCK | MSCK | REPAIR | EXPORT | IMPORT | LOAD | VALUES | COMMENT | ROLE | ROLES | COMPACTIONS | PRINCIPALS | TRANSACTIONS | INDEX | INDEXES | LOCKS | OPTION + | ASC | DESC | LIMIT | RENAME | SETS ; SELECT: 'SELECT'; |