You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Oliver Lee (Jira)" <ji...@apache.org> on 2023/02/01 17:47:00 UTC
[jira] [Updated] (CALCITE-5496) Support time zones when parsing TIMESTAMP literals
[ https://issues.apache.org/jira/browse/CALCITE-5496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Lee updated CALCITE-5496:
--------------------------------
Description:
In Avatica, DateTimeUtils TIMESTAMP_FORMAT_STRING is {{DATE_FORMAT_STRING + " " + TIME_FORMAT_STRING}} which is {{"HH:mm:ss"}} with no handling for time zones if specified.
i.e. in Calcite quidem tests if we run
{{DATETIME(TIMESTAMP "2008-12-25 05:30:00+07", "America/Los_Angeles") as datetime_tstz}}
the TIMESTAMP literal is not supported
Error:
{{Illegal TIMESTAMP WITH LOCAL TIME ZONE literal '2008-12-25 05:30:00+07': not in format 'yyyy-MM-dd HH:mm:ss'}}
was:
In Avatica, DateTimeUtils TIMESTAMP_FORMAT_STRING is {{DATE_FORMAT_STRING + " " + TIME_FORMAT_STRING}} which is {{"HH:mm:ss"}} with no handling for time zones if specified.
i.e. in Calcite quidem tests if we run
{{DATETIME(TIMESTAMP "2008-12-25 05:30:00+07", "America/Los_Angeles") as datetime_tstz}}
the TIMESTAMP literal is not supported
Illegal TIMESTAMP WITH LOCAL TIME ZONE literal '2008-12-25 05:30:00+07': not in format 'yyyy-MM-dd HH:mm:ss'
> Support time zones when parsing TIMESTAMP literals
> --------------------------------------------------
>
> Key: CALCITE-5496
> URL: https://issues.apache.org/jira/browse/CALCITE-5496
> Project: Calcite
> Issue Type: Bug
> Reporter: Oliver Lee
> Priority: Major
>
> In Avatica, DateTimeUtils TIMESTAMP_FORMAT_STRING is {{DATE_FORMAT_STRING + " " + TIME_FORMAT_STRING}} which is {{"HH:mm:ss"}} with no handling for time zones if specified.
>
> i.e. in Calcite quidem tests if we run
> {{DATETIME(TIMESTAMP "2008-12-25 05:30:00+07", "America/Los_Angeles") as datetime_tstz}}
>
> the TIMESTAMP literal is not supported
>
> Error:
>
> {{Illegal TIMESTAMP WITH LOCAL TIME ZONE literal '2008-12-25 05:30:00+07': not in format 'yyyy-MM-dd HH:mm:ss'}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)