Description
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
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.
Attachments
Issue Links
- causes
-
SPARK-38600 Include unit into the sql string of TIMESTAMPADD/DIFF
- Resolved
- links to