[
https://issues.apache.org/jira/browse/CALCITE-5450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde updated CALCITE-5450:
---------------------------------
Description:
Some BigQuery functions, such as {{EXTRACT}} and {{{}DATE_TRUNC{}}}, accept the
operand {{{}WEEK(weekday){}}}, where {{weekday}} is one of {{{}SUNDAY, MONDAY,
TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY{}}}. After this change, any
function that accepts {{WEEK}} or {{ISOWEEK}} timeframe will also accept
{{WEEK(SUNDAY)}} etc.
Note that {{WEEK}} is equivalent to {{WEEK(SUNDAY)}} and {{ISOWEEK}} is
equivalent to {{{}WEEK(MONDAY){}}}.
In this change we also allow {{WEEKS}} as a synonym for {{{}WEEK{}}}, and
{{QUARTERS}} as a synonym for {{{}QUARTER{}}}.
was:
Some BIG_QUERY functions (i.e. {{{}EXTRACT(){}}}, {{DATE_TRUNC()}} ) can accept
the operand
{{WEEK(WEEKDAY)}} where {{WEEKDAY}} is one of {{SUNDAY, MONDAY, TUESDAY,
WEDNESDAY, THURSDAY, FRIDAY, SATURDAY}}
This is not currently supported.
> Add support for WEEK(WEEKDAY) for custom time frames to relevant functions
> --------------------------------------------------------------------------
>
> Key: CALCITE-5450
> URL: https://issues.apache.org/jira/browse/CALCITE-5450
> Project: Calcite
> Issue Type: Improvement
> Reporter: Oliver Lee
> Assignee: Oliver Lee
> Priority: Minor
>
> Some BigQuery functions, such as {{EXTRACT}} and {{{}DATE_TRUNC{}}}, accept
> the operand {{{}WEEK(weekday){}}}, where {{weekday}} is one of {{{}SUNDAY,
> MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY{}}}. After this
> change, any function that accepts {{WEEK}} or {{ISOWEEK}} timeframe will also
> accept {{WEEK(SUNDAY)}} etc.
>
> Note that {{WEEK}} is equivalent to {{WEEK(SUNDAY)}} and {{ISOWEEK}} is
> equivalent to {{{}WEEK(MONDAY){}}}.
> In this change we also allow {{WEEKS}} as a synonym for {{{}WEEK{}}}, and
> {{QUARTERS}} as a synonym for {{{}QUARTER{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)