Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
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
Attachments
Issue Links
- is a child of
-
CALCITE-5180 Implement BigQuery functions for DATE, TIME, TIMESTAMP, DATETIME
- Open
- is a parent of
-
CALCITE-5450 Add support for WEEK(WEEKDAY) for custom time frames to relevant functions
- Closed
- relates to
-
CALCITE-5290 Add DATE_TRUNC function consistent with Postgres
- In Progress
- links to