maropu commented on issue #20433: [SPARK-23264][SQL] Make INTERVAL keyword optional in INTERVAL clauses URL: https://github.com/apache/spark/pull/20433#issuecomment-464451209 I checked if the time unit keywords (YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, MILLISECOND, MICROSECOND) are reserved in SQL-2011/database implementations: SQL-2011 - reserved: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND - non-reserved: WEEK, MILLISECOND, MICROSECOND PostgreSQL, MySQL, Oracle, and SQL Server - reserved: - non-reserved: YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND Also, all the the plural forms (YEARS, MONTHS, ...) are not reserved in all the cases. I'm not sure about the historical reason why these databases don't handle them as reserved though, IMHO we would be better to follow SQL-2011; YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND are reserved if ansi=true. As for SQL server, these time unit keywords are listed in future keywords: https://docs.microsoft.com/ja-jp/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-2017#future-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]
