[
https://issues.apache.org/jira/browse/CALCITE-5449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702010#comment-17702010
]
Tanner Clary commented on CALCITE-5449:
---------------------------------------
I am trying to allow EXTRACT() to accept time frames, primarily {{ISOWEEK}} and
{{WEEK(WEEKDAY)}}. As far as I know, all the math for {{EXTRACT}} lives in
Avatica's {{DateTimeUtils}}. Does anyone have any suggestions for the math
required to accept these (and potentially other) time frames.
> Allow EXTRACT() to accept time frames
> -------------------------------------
>
> Key: CALCITE-5449
> URL: https://issues.apache.org/jira/browse/CALCITE-5449
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Tanner Clary
> Assignee: Tanner Clary
> Priority: Major
>
> Implement BigQuery {{EXTRACT()}} Function. {{EXTRACT(part FROM
> date_expression)}} returns the value from the date_expression corresponding
> to the specified part. Calcite currently supports PostgreSQL' {{DATE_PART}}
> which has similar behavior.
> Example: {{SELECT EXTRACT(DAY FROM DATE '2013-12-25')}} would return 25.
> [BigQuery
> Docs|https://g3doc.corp.google.com/company/teams/googlesql/reference/date_functions.md#extract
> ]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)