forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for TS_WITH_TZ +/- INTERVAL Presto functions (facebookinc…
…ubator#10164) Summary: Pull Request resolved: facebookincubator#10164 Add the following functions: - plus(ts_with_tz, interval) - plus(interval, ts_with_tz) - minus(ts_with_tz, interval) Interval can be either INTERVAL_DAY_TIME or INTERVAL_YEAR_MONTH. These functions are equivalent to date_add and share it's implementation, i.e. plus(ts, interval '1' hour) == date_add('hour', 1, ts). Also, plus(ts, interval) == plus(interval, ts) == minus(ts, -interval). Note that Presto doesn't define minus(interval, ts). date_add has existing bugs described in facebookincubator#10163 Newly added function share implementation with date_add, hence, suffer from the same bugs. Reviewed By: amitkdutta Differential Revision: D58466111 fbshipit-source-id: d5e1c47be67636397f19e3d3d062e18aa91ec7ad
- Loading branch information
1 parent
08e0b30
commit f35c525
Showing
4 changed files
with
173 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters