cloud-fan commented on a change in pull request #23259: [SPARK-26215][SQL] Define reserved/non-reserved keywords based on the ANSI SQL standard URL: https://github.com/apache/spark/pull/23259#discussion_r258947336
########## File path: docs/sql-reserved-and-non-reserved-key-words.md ########## @@ -0,0 +1,573 @@ +--- +layout: global +title: SQL Reserved/Non-Reserved Key Words +displayTitle: SQL Reserved/Non-Reserved Key Words +--- + +When `spark.sql.parser.ansi.enabled` is set to true (false by default), some keywords are reserved for Spark SQL. +The reserved keywords cannot be used for identifiers (e.g., table names, view names, column names, column aliases) in a query. Review comment: do you know what's the definition of reserved keyword in SQL standard? I checked the antlr file, seems the only difference between reserved and non-reserved keywords is, reserved keywords can't be used in table alias. Note that, I treat all the keywords that can be used in `strictIdentifier` as reserved keywords. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
