bziobrowski opened a new pull request, #14298: URL: https://github.com/apache/pinot/pull/14298
This PR adds an optional parameter to dateTimeConvert() function - bucketing time zone. It allows specifying specific time zone to bucketing, regardless of output time zone - which could be epoch millis or a formatted string. Examples: ```sql select dateTimeConvert(86400001, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss.SSSZ', '1:MILLISECONDS' ) from dual``` returns 1970-01-02 00:00:00.001+0000 ```sql select dateTimeConvert(86400001, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:EPOCH', '1:DAYS', 'CET') from dual``` returns 82800000 ```sql select dateTimeConvert(86400001, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss.SSSZ', '1:DAYS', 'CET') from dual ``` returns `1970-01-01 23:00:00.000+0000` because `1970-01-02 00:00:00.001+0000` is rounded to `1970-01-02 00:00:00.001+0200` in CET time zone and then converted to UTC. ```sql select dateTimeConvert(86400001, '1:MILLISECONDS:EPOCH', '1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss.SSS tz(America/Los_Angeles)', '1:DAYS', 'CET') from dual``` returns 1970-01-01 15:00:00.000 Note: when bucketing time zone is set, bucketing is performed relative to bigger time unit (e.g. 1 day when bucketing to 1 hour ) and not epoch start. Fixes #8581 -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org