You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/17 12:30:17 UTC

[GitHub] maropu commented on issue #20433: [SPARK-23264][SQL] Make INTERVAL keyword optional in INTERVAL clauses

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org