You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jess Balint (Jira)" <ji...@apache.org> on 2023/02/07 22:34:01 UTC

[jira] [Closed] (CALCITE-5432) Implement BigQuery TIME_ADD/TIME_DIFF

     [ https://issues.apache.org/jira/browse/CALCITE-5432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jess Balint closed CALCITE-5432.
--------------------------------

Resolved in release 1.33.0 (2023-02-06)

> Implement BigQuery TIME_ADD/TIME_DIFF
> -------------------------------------
>
>                 Key: CALCITE-5432
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5432
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Tanner Clary
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.33.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Implement [TIME_ADD|https://cloud.google.com/bigquery/docs/reference/standard-sql/time_functions#time_add] and [TIME_DIFF|https://cloud.google.com/bigquery/docs/reference/standard-sql/time_functions#time_diff] functions (compatible with BigQuery)
> {{TIME_ADD(time_expression, INTERVAL int64_expression part)}} adds {{int64_expression }} units of {{part}} to the {{time}} object. For example, the outcome of:
> {{TIME_ADD(TIME '15:30:00', INTERVAL 5 MINUTE)}} is {{15:35:00}}.
> {{TIME_DIFF(time_expression_a, time_expression_b, part)}} finds the whole number of {{part}} between {{time_expression_a}} and {{time_expression_b}} . If {{time_expression_a}} is earlier than {{time_expression_b}}, the outcome is negative. For example, the outcome of:
> {{TIME_DIFF(TIME '15:30:00', TIME '15:40:00', MINUTE)}} is {{-10}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)