[
https://issues.apache.org/jira/browse/SPARK-38195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Max Gekk resolved SPARK-38195.
------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
Issue resolved by pull request 35502
[https://github.com/apache/spark/pull/35502]
> Add the TIMESTAMPADD() function
> -------------------------------
>
> Key: SPARK-38195
> URL: https://issues.apache.org/jira/browse/SPARK-38195
> Project: Spark
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 3.3.0
> Reporter: Max Gekk
> Assignee: Max Gekk
> Priority: Major
> Fix For: 3.3.0
>
>
> 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)
> {code:sql}
> TIMESTAMPADD( SECOND, 2 , timestamp '2021-12-12 12:00:00.00') returns
> 2021-12-12 12:00:02.00
> {code}
> The ODBC syntax {fn } requires the interval value to have a prefix of
> sql_tsi_ while plain sql doesn't. See
> * [Time, Date, and Interval
> Functions|https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/time-date-and-interval-functions?view=sql-server-ver15]
> * [TIMESTAMPADD function (ODBC
> compatible)|https://docs.faircom.com/doc/sqlref/33476.htm]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]