[
https://issues.apache.org/jira/browse/CALCITE-7526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-7526:
------------------------------------
Labels: pull-request-available (was: )
> 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
>
> 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)