You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Marios Trivyzas (Jira)" <ji...@apache.org> on 2022/02/22 10:32:00 UTC

[jira] [Commented] (FLINK-24423) Cast from TIME to TIMESTAMP currently uses Epoch Date

    [ https://issues.apache.org/jira/browse/FLINK-24423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496001#comment-17496001 ] 

Marios Trivyzas commented on FLINK-24423:
-----------------------------------------

Imho, I would keep it as is, a time can be translated to millis and in turn those millis represent a time at the EPOCH date: {*}01/01/1970{*},

which for me it makes sense, more than oracle's behaviour to use current system date.

 

I'd rather keep the behaviour as is.

[~twalthr] [~slinkydeveloper] what do you think? If you agree I'll just go ahead and close this issue.

> Cast from TIME to TIMESTAMP currently uses Epoch Date
> -----------------------------------------------------
>
>                 Key: FLINK-24423
>                 URL: https://issues.apache.org/jira/browse/FLINK-24423
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Marios Trivyzas
>            Priority: Major
>
> *.from(TIME(5), LocalTime.parse("12:34:56.1234567")).resultsIn(LocalDateTime.of(1970, 1, 1, 12, 34, 56, 0))*
>  
> PostgreSQL doesn't allow such a cast, whereas Oracle uses the current system Date of the server.
>  
> Should we keep it as is, or zero out the year? so end up with: 
> *LocalDateTime.of(0, 1, 1, 12, 34, 56, 0))*
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)