ccoffline opened a new issue #4619: URL: https://github.com/apache/incubator-doris/issues/4619
**Is your feature request related to a problem? Please describe.** A olap engine always deals with time. There are `time_floor` and `time_ceil` in [Druid](https://druid.apache.org/docs/latest/querying/sql.html#time-functions) that Doris doesn't have. **Describe the solution you'd like** I am working on it. Due to closely related to `timestamp_diff`, I am going to fix #4618 if no one is working on it. Plz let me know if you do. **Describe alternatives you've considered** There are two solutions. - Accept string param represents [ISO 8601 Duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), need to use regex. - Keep the same style like `timestamp_diff`, such as `year_floor`. This need to generate a lot of functions to support different granularities and params overload. I'm working on the second one. This solution provides a direct implementation. I have implemented `7(year, month, week, day, hour, minute, second) * 2(floor, ceil) * 4([timestamp], [ts, period], [ts, origin], [ts, period, origin])` = 56 functions. `period` specifies the number of the time granularity, such as `3 months`. `origin` specifies when does the period begins, such as a `MONDAY` in `DATETIME` type, or day `09` in any month. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
