You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2026/05/14 20:02:00 UTC
[jira] [Resolved] (CALCITE-7526) Incorrect TIMESTAMP WITH TIME ZONE produces wrong error message
[ https://issues.apache.org/jira/browse/CALCITE-7526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mihai Budiu resolved CALCITE-7526.
----------------------------------
Fix Version/s: 1.42.0
Resolution: Fixed
Fixed in [https://github.com/apache/calcite/commit/3774ade07252ec5b9561c70bf64b9d264e1efabc]
Thank you for the review [~snuyanzin]
> Incorrect TIMESTAMP WITH TIME ZONE produces wrong error message
> ---------------------------------------------------------------
>
> Key: CALCITE-7526
> URL: https://issues.apache.org/jira/browse/CALCITE-7526
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.41.0
> Reporter: Mihai Budiu
> Assignee: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.42.0
>
>
> The validation code for TIMESTAMP WITH TIME ZONE looks like this:
> {code:java}
> if (pos == -1) {
> throw RESOURCE.illegalLiteral("TIMESTAMP WITH LOCAL TIME ZONE", v,
> RESOURCE.badFormat(TIMESTAMP_FORMAT_STRING).str()).ex();
> }{code}
> Notice that the argument of badFormat is TIMESTAMP_FORMAT_STRING, instead of a format that is specific for TIMESTAMP WITH TIME ZONE. So the error can look like this:
> {code:java}
> Illegal TIMESTAMP WITH LOCAL TIME ZONE literal '2020-06-21 14:23:44.123654': not in format 'yyyy-MM-dd HH:mm:ss'{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)