Description
There are 2 kinds of SQL keywords: reserved and non-reserved. Reserved keywords can't be used as identifiers.
In Spark SQL, we are too tolerant about non-reserved keywors. A lot of keywords are non-reserved and sometimes it cause ambiguity (IIRC we hit a problem when improving the INTERVAL syntax).
I think it will be better to just follow other databases or SQL standard to define reserved keywords, so that we don't need to think very hard about how to avoid ambiguity.
For reference: https://www.postgresql.org/docs/8.1/sql-keywords-appendix.html
Attachments
Issue Links
- contains
-
SPARK-22553 Drop FROM in nonReserved
- Resolved
- is related to
-
SPARK-20964 Make some keywords reserved along with the ANSI/SQL standard
- Resolved
-
SPARK-27060 DDL Commands are accepting Keywords like create, drop as tableName
- Resolved
- relates to
-
SPARK-26905 Revisit reserved/non-reserved keywords based on the ANSI SQL standard
- Resolved
-
SPARK-20964 Make some keywords reserved along with the ANSI/SQL standard
- Resolved
- links to
cc maropu LI,Xiao viirya mgaido