[
https://issues.apache.org/jira/browse/CALCITE-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606824#comment-17606824
]
Julian Hyde commented on CALCITE-5269:
--------------------------------------
Well done noticing the difference between Postgres and BigQuery {{DATE_TRUNC}}.
As part of CALCITE-5155 I am adding {{{}CEIL(x TO frame){}}}, where {{x}} is an
expression of type DATE, TIME or TIMESTAMP and {{frame}} is an identifier. To
be valid, {{frame}} must resolve to the name of a valid time frame, but that
can include custom time frames for the current session/dialect, such as {{Y}}
as an abbreviation for the built-in time frame {{YEAR}}, or {{minute15}} as a
custom 15-minute time frame as in
[Looker|https://cloud.google.com/looker/docs/reference/param-field-dimension-group],
or {{WEEK(THURSDAY)}} as a time frame where each week starts on a Thursday.
I logged CALCITE-5290 for Postgres-style {{DATE_TRUNC}}.
> Implement BigQuery TIME_TRUNC and TIMESTAMP_TRUNC functions
> -----------------------------------------------------------
>
> Key: CALCITE-5269
> URL: https://issues.apache.org/jira/browse/CALCITE-5269
> Project: Calcite
> Issue Type: Sub-task
> Reporter: TJ Banghart
> Assignee: TJ Banghart
> Priority: Major
>
> Implement missing BigQuery functions for:
> * TIME_TRUNC
> * TIMESTAMP_TRUNC
--
This message was sent by Atlassian Jira
(v8.20.10#820010)