-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
A-SQLArea: SQL layerArea: SQL layerfeatureNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Describe This Problem
In early version of CeresDB, there is a custom UDF time_bucket to align time of values, but now datafusion support it out of box, so I suggest deprecate our time_bucket, and use data_bin instead. Ex:
SELECT
DATE_BIN(INTERVAL '15' minute, time, TIMESTAMP '2001-01-01T00:00:00Z') AS time,
val
FROM (
VALUES
(TIMESTAMP '2021-06-10 17:05:00Z', 0.5),
(TIMESTAMP '2021-06-10 17:19:10Z', 0.3)
) as t (time, val)
"+---------------------+-----+",
"| time | val |",
"+---------------------+-----+",
"| 2021-06-10 17:00:00 | 0.5 |",
"| 2021-06-10 17:15:00 | 0.3 |",
"+---------------------+-----+",Proposal
- Completely remove it before 1.0 is out.
- If cannot remove it, add a deprecation warning.
Additional Context
Metadata
Metadata
Assignees
Labels
A-SQLArea: SQL layerArea: SQL layerfeatureNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers