[
https://issues.apache.org/jira/browse/CALCITE-6021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768095#comment-17768095
]
Tanner Clary commented on CALCITE-6021:
---------------------------------------
Hey [~julianhyde], [~jswett] do either of you remember from [CALCITE-4297] why
{{CURRENT_DATETIME}} was not fully allowed as a niladic function (test for
clarity:
[ac96eb8|https://github.com/apache/calcite/commit/ac96eb8888c5009e781a31503288adf292000b80#diff-a85b0fc0f75ac484ae9307e3a5eb51f1275833bd81051c247f52a95406784ddcR1506].
From what I can tell, it has something to do with it being a library operator
(to test, I moved the PI operator into the library operator table and it began
failing with similar errors). Any light either of you could shed on that would
be great. Thanks!
> Add CURRENT_DATETIME function (enabled in BigQuery library)
> -----------------------------------------------------------
>
> Key: CALCITE-6021
> URL: https://issues.apache.org/jira/browse/CALCITE-6021
> Project: Calcite
> Issue Type: Bug
> Reporter: Tanner Clary
> Priority: Major
>
> Calcite supports parsing and validation for the CURRENT_DATETIME function
> according to CALCITE-4297 . However a native implementation was never added.
> The docs for the function may be found here:
>
> https://cloud.google.com/bigquery/docs/reference/standard-sql/datetime_functions#current_datetime
> An example:
> {{SELECT CURRENT_DATETIME([timezone])}} should return the current time as a
> {{DATETIME}} (a Calcite TIMESTAMP). There is an optional time zone argument.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)