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 2022/10/05 16:10:00 UTC

[jira] [Commented] (CALCITE-5301) Support AT TIME ZONE

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

Julian Hyde commented on CALCITE-5301:
--------------------------------------

It would be great to have {{AT TIME ZONE}}. Whereas {{WITH TIME ZONE}} is part of the name of a data type, I see {{AT TIME ZONE}} as a binary operator with the signature {{(TIMESTAMP, CHAR) &rarr; TIMESTAMP WITH TIME ZONE}} and possibly with variations like {{(TIMESTAMP WITH TIME ZONE, CHAR) &rarr; TIMESTAMP WITH TIME ZONE}} and {{(TIMESTAMP WITH LOCAL TIME ZONE, CHAR) &rarr; TIMESTAMP WITH TIME ZONE}}.

If you agree, could you write down the actual signature(s) that you propose to implement, and give some SQL examples? They might be different from the examples for other products because, unlike PrestoDB, Calcite does not allow "UTC" inside a {{TIMESTAMP}} literal.

> Support AT TIME ZONE
> --------------------
>
>                 Key: CALCITE-5301
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5301
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: Rong Rong
>            Priority: Major
>
> Calcite already supports WITH TIME ZONE suffix in: CALCITE-3238
> a slightly different syntax supported by many is: {{AT TIME ZONE}}
> see:
> - https://www.postgresql.org/docs/14/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT
> - https://prestodb.io/docs/current/functions/datetime.html#time-zone-conversion
> would it be possible to support this syntax that converts a TIMESTAMP with time zone to another timezone?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)