You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Lim Qing Wei (Jira)" <ji...@apache.org> on 2022/07/04 20:50:00 UTC

[jira] [Resolved] (FLINK-28365) TO_TIMESTAMP lose precision beyond seconds

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

Lim Qing Wei resolved FLINK-28365.
----------------------------------
    Resolution: Not A Problem

> TO_TIMESTAMP lose precision beyond seconds
> ------------------------------------------
>
>                 Key: FLINK-28365
>                 URL: https://issues.apache.org/jira/browse/FLINK-28365
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.16.0, 1.15
>            Reporter: Lim Qing Wei
>            Priority: Major
>             Fix For: 1.16.0, 1.15
>
>
> The TO_TIMESTAMP function in Flink SQL seems to have a regression.
>  
> It loses the precision after seconds, for example
>  
> {code:java}
> TO_TIMESTAMP('2020-01-01 15:35:00.123456'){code}
> returns 2020-01-01 15:35:00.123 in the resulting SQL AST, note that the last 3 digit are missing.
>  
> I think this started in 1.15.x, because I have code in 1.14 that preserve the precision as I expect.
>  
> Do you agree this is a bug?
> PS: The documentation isn't very comprehensive: [https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/functions/systemfunctions/]
>  
> I've added a few assertions to illustrate the issue: [https://github.com/apache/flink/pull/20139]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)