maropu commented on issue #20433: [SPARK-23264][SQL] Make INTERVAL keyword 
optional in INTERVAL clauses
URL: https://github.com/apache/spark/pull/20433#issuecomment-458791243
 
 
   aha, got it.
   Based on the ANSI one below, I think the the plural from is not reserved:
   
https://developer.mimer.com/wp-content/uploads/2018/05/Standard-SQL-Reserved-Words-Summary.pdf
   So, to comply with the ANSI SQL, we need to reserve `year, month, week, day, 
hour, minute, second, millisecond, and microsecond` for the interval.
   
   Ah,... I just noticed `the parser regards 2 seconds as a interval` is not a 
ANSI behaviour because `seconds` is not reserved...? Postgre/Hive just regards 
`2 seconds` as a interval though.
   
   Anyway, we should include the fix to reserve these keywords in this pr?
   To do so, we need to port some logics from 
#23259(https://github.com/apache/spark/pull/23259/files#diff-9847f5cef7cf7fbc5830fbc6b779ee10R1405)
 to here, and then I feel this pr gets a little complicated?
   

----------------------------------------------------------------
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]

Reply via email to