You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Tanner Clary (Jira)" <ji...@apache.org> on 2023/02/27 03:19:00 UTC
[jira] [Commented] (CALCITE-5464) Implement BigQuery DATE_ADD/DATE_DIFF
[ https://issues.apache.org/jira/browse/CALCITE-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693771#comment-17693771 ]
Tanner Clary commented on CALCITE-5464:
---------------------------------------
Closed in [cb97d29|https://github.com/apache/calcite/commit/cb97d299d2a04485a84916cff3f7be5497028b31], thanks for help/review [~julianhyde]!
> Implement BigQuery DATE_ADD/DATE_DIFF
> -------------------------------------
>
> Key: CALCITE-5464
> URL: https://issues.apache.org/jira/browse/CALCITE-5464
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Tanner Clary
> Assignee: Tanner Clary
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Add support for BigQuery DATE_ADD/DATE_DIFF functions.
> {{DATE_ADD(date_expression, interval)}} adds the interval to the date expression.
> Example: {{DATE_ADD(DATE '2008-12-25', INTERVAL 3 DAY)}} would return '2008-12-28'.
> [BigQuery docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_add]
> {{DATE_DIFF(date_expression, date_expression2, time_unit)}} returns the whole number of time_unit between the first and second date expressions, with the result being negative if the first date is earlier than the second.
> Example: {{DATE_DIFF(DATE '2008-12-25', DATE '2008-12-28', DAY)}} would return -3.
> [BigQuery docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_diff]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)