forked from apache/pinot
-
Notifications
You must be signed in to change notification settings - Fork 0
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 date_bin() function. (apache#12790)
* Add support for date_bin() function. Add support for the Postgres SQL date_bin function (ref https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-BIN). - The 'stride' or 'binWidth' is specified in the `Period` format. For example: `1d` : for 1 day `24h` : for 24 hours `1h30m` : for 1 hours and 30 minutes - The granularities supported for `stride` are `seconds`, `minutes`, `hours` and `days`. - The `source` and `origin` times are in `Timestamp` format which is in local time zone in Pinot. Example Queries: `select date_bin(`3h`, '2024-03-10 23:29:55.0', '2024-01-01 00:00:00.0') from myTable` `select date_bin(`3h`, myTimeColumn, '2024-01-01 00:00:00.0') from myTable` * Update DateTimeFunctions.java --------- Co-authored-by: Xiang Fu <xiangfu.1024@gmail.com>
- Loading branch information
1 parent
a74a6e4
commit 4306a6f
Showing
2 changed files
with
87 additions
and
2 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