tanclary opened a new pull request, #3024: URL: https://github.com/apache/calcite/pull/3024
This is a beginning draft for the work to implement BigQuery DATETIME_ADD/DATETIME_DIFF. Currently, DATETIME_ADD is functioning as expected and is passing all operator and quidem tests. DATETIME_DIFF is not currently passing quidem tests for a couple of different reasons: the 'week' time unit is only counting whole number of weeks rather than demarcating each Sunday, as well as 'isoyear' for a similar reason. Any comments on these issues or the rest of the changes would be highly appreciated! More information about the functions may be found below. DATETIME_ADD(datetime, interval) can accept a timestamp (or a datetime, which is an alias for timestamp) for its first argument and an interval for its second. The output is the datetime that occurs interval after the provided datetime. DATETIME_DIFF(datetime, datetime2, timeUnit) returns the whole number of timeUnit between datetime and datetime2, with the result being negative if datetime occurs before datetime2 Examples: DATETIME_ADD(TIMESTAMP '2008-12-25 15:30:00', INTERVAL 5 MINUTE) would return: '2008-12-25 15:35:00'. DATETIME_DIFF(TIMESTAMP '2008-12-25 15:30:00', TIMESTAMP '2008-12-26 15:30:00', DAY) would return: -1. -- 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...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org