[
https://issues.apache.org/jira/browse/FLINK-37803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mika Naylor resolved FLINK-37803.
---------------------------------
Resolution: Fixed
> LocalTime without seconds is incorrectly serialized to SQL as a value literal
> -----------------------------------------------------------------------------
>
> Key: FLINK-37803
> URL: https://issues.apache.org/jira/browse/FLINK-37803
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Mika Naylor
> Assignee: Mika Naylor
> Priority: Major
> Fix For: 1.19.3, 1.20.2, 2.1.0, 2.0.1
>
>
> When creating a literal from a LocalTime object without seconds, like
> LocalTime.of(12, 12), the serialisable string form of the value literal is
> serialized into invalid SQL expression, in this case TIME '12:12' instead of
> TIME '12:12:00', resulting in:
> {code:java}
> org.apache.flink.table.api.ValidationException: SQL validation failed:
> Illegal TIME literal '12:12': not in format 'HH:mm:ss'{code}
> This also affects LocalDateTime objects used in the same way:
> {code:java}
> org.apache.flink.table.api.ValidationException: SQL validation failed:
> Illegal TIMESTAMP literal '2024-02-03 12:12': not in format 'yyyy-MM-dd
> HH:mm:ss'{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)