[
https://issues.apache.org/jira/browse/CALCITE-5450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652660#comment-17652660
]
Julian Hyde commented on CALCITE-5450:
--------------------------------------
Take a look at the syntax for, say, {{EXTRACT}} and you will see that it calls
{{TimeUnitOrName()}}. So the argument can be a custom time frame, not just a
builtin time unit.
The problem with {{addSub}} is that it is private. I was hoping that you could
add the weekday frames as non-core time frames. And so you will probably need
{{withEpoch}}.
> Add to parser WEEK(WEEKDAY) for custom time frames
> --------------------------------------------------
>
> Key: CALCITE-5450
> URL: https://issues.apache.org/jira/browse/CALCITE-5450
> Project: Calcite
> Issue Type: Improvement
> Reporter: Oliver Lee
> Priority: Minor
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)