[
https://issues.apache.org/jira/browse/CALCITE-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-5447.
----------------------------------
Fix Version/s: 1.33.0
Resolution: Fixed
Fixed in
[bdb4e1fb|https://github.com/apache/calcite/commit/bdb4e1fb5df6fdca237dd0fa92209905c2f94d76];
thanks for the PR, [~oliverlee]!
> Add DATE_TRUNC for BigQuery
> ---------------------------
>
> Key: CALCITE-5447
> URL: https://issues.apache.org/jira/browse/CALCITE-5447
> Project: Calcite
> Issue Type: Improvement
> Reporter: Oliver Lee
> Assignee: Oliver Lee
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.33.0
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> Adding in BigQuery's definition of DATE_TRUNC as described
> [https://g3doc.corp.google.com/company/teams/googlesql/reference/date_functions.md?cl=head#date-trunc]
>
> ex.
> DATE_TRUNC('2022-01-05', month) -> 2022-01-01
> DATE_TRUNC('2022-01-05', day) -> 2022-01-05
> DATE_TRUNC('2022-01-05', year) -> 2022-01-01
>
>
> Supported parameters:
> * {{DAY}}
> * {{WEEK}}
> * {{{}WEEK(WEEKDAY){}}}following: {{{}SUNDAY{}}}, {{{}MONDAY{}}},
> {{{}TUESDAY{}}}, {{{}WEDNESDAY{}}}, {{{}THURSDAY{}}}, {{{}FRIDAY{}}}, or
> {{{}SATURDAY{}}}.
> * {{ISOWEEK}}
> * {{MONTH}}
> * {{QUARTER}}
> * {{YEAR}}
> * {{ISOYEAR}}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)