You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Mika Naylor (Jira)" <ji...@apache.org> on 2025/05/14 13:56:00 UTC

[jira] [Assigned] (FLINK-37803) LocalTime without seconds is incorrectly serialized to SQL as a value literal

     [ https://issues.apache.org/jira/browse/FLINK-37803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mika Naylor reassigned FLINK-37803:
-----------------------------------

    Assignee: Mika Naylor

> 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
>
> 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)