Skip to content

Commit

Permalink
[SPARK-26905][SQL] Follow the SQL:2016 reserved keywords
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR intends to move keywords `ANTI`, `SEMI`, and `MINUS` from reserved to non-reserved.

### Why are the changes needed?

To comply with the ANSI/SQL standard.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Added tests.

Closes #28807 from maropu/SPARK-26905-2.

Authored-by: Takeshi Yamamuro <yamamuro@apache.org>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
  • Loading branch information
maropu committed Jun 15, 2020
1 parent eae1747 commit 3698a14
Show file tree
Hide file tree
Showing 4 changed files with 429 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/sql-ref-ansi-compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Below is a list of all the keywords in Spark SQL.
|ALTER|non-reserved|non-reserved|reserved|
|ANALYZE|non-reserved|non-reserved|non-reserved|
|AND|reserved|non-reserved|reserved|
|ANTI|reserved|strict-non-reserved|non-reserved|
|ANTI|non-reserved|strict-non-reserved|non-reserved|
|ANY|reserved|non-reserved|reserved|
|ARCHIVE|non-reserved|non-reserved|non-reserved|
|ARRAY|non-reserved|non-reserved|reserved|
Expand Down Expand Up @@ -264,7 +264,7 @@ Below is a list of all the keywords in Spark SQL.
|MAP|non-reserved|non-reserved|non-reserved|
|MATCHED|non-reserved|non-reserved|non-reserved|
|MERGE|non-reserved|non-reserved|non-reserved|
|MINUS|reserved|strict-non-reserved|non-reserved|
|MINUS|not-reserved|strict-non-reserved|non-reserved|
|MINUTE|reserved|non-reserved|reserved|
|MONTH|reserved|non-reserved|reserved|
|MSCK|non-reserved|non-reserved|non-reserved|
Expand Down Expand Up @@ -325,7 +325,7 @@ Below is a list of all the keywords in Spark SQL.
|SCHEMA|non-reserved|non-reserved|non-reserved|
|SECOND|reserved|non-reserved|reserved|
|SELECT|reserved|non-reserved|reserved|
|SEMI|reserved|strict-non-reserved|non-reserved|
|SEMI|non-reserved|strict-non-reserved|non-reserved|
|SEPARATED|non-reserved|non-reserved|non-reserved|
|SERDE|non-reserved|non-reserved|non-reserved|
|SERDEPROPERTIES|non-reserved|non-reserved|non-reserved|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ ansiNonReserved
| AFTER
| ALTER
| ANALYZE
| ANTI
| ARCHIVE
| ARRAY
| ASC
Expand Down Expand Up @@ -1146,10 +1147,12 @@ ansiNonReserved
| ROW
| ROWS
| SCHEMA
| SEMI
| SEPARATED
| SERDE
| SERDEPROPERTIES
| SET
| SETMINUS
| SETS
| SHOW
| SKEWED
Expand Down
Loading

0 comments on commit 3698a14

Please sign in to comment.