You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/02/01 20:42:00 UTC

[jira] [Commented] (CALCITE-5449) Implement EXTRACT() Function for BigQuery

    [ https://issues.apache.org/jira/browse/CALCITE-5449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683144#comment-17683144 ] 

Julian Hyde commented on CALCITE-5449:
--------------------------------------

[~tanclary], There are a few tests for {{EXTRACT}} in {{big-query.iq}}. I uncommented them and got a couple of different internal errors in Calcite code; they relate to a call to {{getMonotonicity}} and seem to indicate that operands ordinals are messed up. I had assumed that the tests for {{EXTRACT}} in {{SqlOperatorTest}} were sufficient, but evidently the Quidem-based test exercises some functionality that is necessary but is broken. Can you take a look, please? The end state is that those tests are all uncommented and working.

> Implement EXTRACT() Function for BigQuery
> -----------------------------------------
>
>                 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)