You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/03/10 18:53:00 UTC

[jira] [Commented] (SPARK-38509) Unregister the TIMESTAMPADD/DIFF functions and remove DATE_ADD/DIFF

    [ https://issues.apache.org/jira/browse/SPARK-38509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504521#comment-17504521 ] 

Apache Spark commented on SPARK-38509:
--------------------------------------

User 'MaxGekk' has created a pull request for this issue:
https://github.com/apache/spark/pull/35805

> Unregister the TIMESTAMPADD/DIFF functions and remove DATE_ADD/DIFF
> -------------------------------------------------------------------
>
>                 Key: SPARK-38509
>                 URL: https://issues.apache.org/jira/browse/SPARK-38509
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Max Gekk
>            Priority: Major
>
> 1. Unregister the functions `timestampadd()` and `timestampdiff()` in `FunctionRegistry.expressions`.
> 2. Remove the aliases `date_add` for `timestampadd()` and `date_diff` for `timestampdiff()`.
> 3. Align tests (regenerate golden files) to the syntax rules
> where the first parameter `unit` can have one of the identifiers:
>    - YEAR
>    - QUARTER
>    - MONTH
>    - WEEK
>    - DAY, DAYOFYEAR (valid for timestampadd)
>    - HOUR
>    - MINUTE
>    - SECOND
>    - MILLISECOND
>    - MICROSECOND
> h4. Why are the changes needed?
> 1. The `timestampadd()`/`timestampdiff()` functions (and their aliases) with arbitrary string column as the first parameter is not require by any standard.
> 2. Remove the functions and aliases should reduce maintenance cost.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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