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

Leonard Xu edited comment on FLINK-21978 at 3/26/21, 1:49 PM:
--------------------------------------------------------------

 [~twalthr], Snowflake supports cast conversion between INT/BIGINT and 
TIMESTAMP_LTZ, both INT value and BIGINT value are treated as seconds, and 
Oracle doesn't support the cast conversion between INT/BIGINT and TIMESTAMP 
WITH LOCAL TIME ZONE.  The conservative approach looks better base on this. 


was (Author: leonard xu):
 [~twalthr], Snowflake supports cast conversion between INT/BIGINT and 
TIMESTAMP, both INT value and BIGINT value are treated as seconds, and Oracle 
doesn't support the cast conversion between INT/BIGINT and TIMESTAMP.  The 
conservative approach looks better base on this. 

> Disable cast conversion between Numeric type and TIMESTAMP_LTZ type
> -------------------------------------------------------------------
>
>                 Key: FLINK-21978
>                 URL: https://issues.apache.org/jira/browse/FLINK-21978
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>    Affects Versions: 1.13.0
>            Reporter: Leonard Xu
>            Assignee: Leonard Xu
>            Priority: Major
>              Labels: pull-request-available
>
> Currently we has supported the cast conversion between Numeric type and 
> TIMESTAMP_LTZ type, we suppose the numeric value e.g `Long type 1000L` as 
> epoch seconds and then cast  to TIMESTAMP_LTZ, but the java.lang.Long is a 
> conversion class of `LocalZonedTimestampType`  and treats as milliseconds.
> To avoid the inconsistency, we should disable it and encourage user to use 
> `TO_TIMESTAMP_LTZ(numeric, precisoon)` function.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to