Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.3.0
-
None
Description
The function TIMESTAMPADD() is a part of the ODBC api and implemented virtually by ALL other databases are missing in Spark SQL.
The first argument is an unary interval (HOUR, YEAR, DAY, etc)
TIMESTAMPADD( SECOND, 2 , timestamp '2021-12-12 12:00:00.00') returns 2021-12-12 12:00:02.00
The ODBC syntax requires the interval value to have a prefix of sql_tsi_ while plain sql doesn't. See
Attachments
Issue Links
- blocks
-
SPARK-38332 Add the `DATEADD()` alias for `TIMESTAMPADD()`
- Resolved
- is a parent of
-
SPARK-38535 Add the datetimeUnit enum to the grammar and use it in TIMESTAMPADD/DIFF
- Resolved
- links to