You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Oliver Lee (Jira)" <ji...@apache.org> on 2022/12/28 00:39:00 UTC
[jira] [Comment Edited] (CALCITE-5450) Add to parser WEEK(WEEKDAY) for custom time frames
[ https://issues.apache.org/jira/browse/CALCITE-5450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652338#comment-17652338 ]
Oliver Lee edited comment on CALCITE-5450 at 12/28/22 12:38 AM:
----------------------------------------------------------------
Hi [~julianhyde] could you explain what you by {{withOffset}} ? I couldn't find anything existing for that, do you mean to add an implementation where the offset is parameterized?
Many of the functions rely on TimeUnit.name, would that work if theres a parameter?
Just to try and get it working I locally made naiive changes to Avatica adding in some TimeUnits {{TimeUnit.WEEK_SUNDAY, TimeUnit.WEEK_MONDAY. }} etc. and have the parser recognizing that, and got it working in TimeFrameTest, but my babel quidem tests don't show the correct dates when I do date_trunc()
was (Author: JIRAUSER297744):
Hi [~julianhyde] could you explain what you by {{withOffset}} ? I couldn't find anything existing for that, do you mean to add an implementation where the offset is parameterized?
Many of the functions rely on TimeUnit.name, would that work if theres a parameter?
Just to try and get it working I locally made naiive changes to Avatica adding in some TimeUnits {{TimeUnit.WEEK_SUNDAY, TimeUnit.WEEK_MONDAY. }} and have the parser recognizing that, and got it working in TimeFrameTest, but my babel quidem tests don't show the correct dates when I do date_trunc()
> 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)