You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chen (Jira)" <ji...@apache.org> on 2020/10/14 03:59:00 UTC

[jira] [Resolved] (CALCITE-4297) Babel should accept CURRENT_DATE and CURRENT_DATETIME, with and without parentheses

     [ https://issues.apache.org/jira/browse/CALCITE-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Danny Chen resolved CALCITE-4297.
---------------------------------
    Fix Version/s: 1.27.0
         Assignee: Danny Chen
       Resolution: Fixed

Fixed in [ac96eb8|https://github.com/apache/calcite/commit/ac96eb8888c5009e781a31503288adf292000b80], thanks for the PR, [~jswett] ~

> Babel should accept CURRENT_DATE and CURRENT_DATETIME, with and without parentheses
> -----------------------------------------------------------------------------------
>
>                 Key: CALCITE-4297
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4297
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel
>    Affects Versions: 1.25.0
>            Reporter: Justin Swett
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.27.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The following BigQuery SQL contains CURRENT_DATE and CURRENT_DATETIME without parentheses. Babel parser should accept it. (It should also accept CURRENT_TIME and CURRENT_TIMESTAMP with parentheses.)
>  
> The following SQL should trigger *CalciteContextException: No match found for function signature CURRENT_TIMESTAMP()* for the date functions, or if you add parens to the current_time.
>  
> {code:java}
> WITH THE_TIMES_ARE_STATIC AS
> (SELECT
>     CURRENT_DATE as a_date,
>     CURRENT_DATETIME() as a_datetime,
>     CURRENT_TIME as a_time,
>     CURRENT_TIMESTAMP() as a_timestamp
> )
> SELECT * FROM THE_TIMES_ARE_STATIC 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)