You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2022/03/10 18:45:00 UTC
[jira] [Created] (SPARK-38509) Unregister the TIMESTAMPADD/DIFF functions and remove DATE_ADD/DIFF
Max Gekk created SPARK-38509:
--------------------------------
Summary: 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
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