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

Leonard Xu updated FLINK-21715:
-------------------------------
    Description: 
The existed UDFs using `LocalDateTime` or `java.sql.Timestamp` as parameters 
type, if the data type of parameter column in SQL changed from TIMESTAMP to 
TIMESTAMP_LTZ, these UDFs must be rewritten, because TIMESTAMP_LTZ data type 
does not support `LocalDateTime` or `java.sql.Timestamp` as conversion class.

The first approach is to support the two conversion classes  for TIMESTAMP_LTZ  
data type, to obtain the correct result, the local time zone information is 
necessary when conversion happens between  SQL internal data structure 
`TimestampData` and external conversion class `LocalDateTime` or 
`java.sql.Timestamp`.

In this approach, I made a POC, I found that there are more changes than we 
thought before. It is difficult to cover with tests and it is easy to introduce 
bugs.

Thus, to resolve the UDF compatibility issue, we consider support the 

> Support  implicit cast conversion between timestamp and timestamp_ltz
> ---------------------------------------------------------------------
>
>                 Key: FLINK-21715
>                 URL: https://issues.apache.org/jira/browse/FLINK-21715
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API, Table SQL / Runtime
>            Reporter: Leonard Xu
>            Assignee: Leonard Xu
>            Priority: Major
>
> The existed UDFs using `LocalDateTime` or `java.sql.Timestamp` as parameters 
> type, if the data type of parameter column in SQL changed from TIMESTAMP to 
> TIMESTAMP_LTZ, these UDFs must be rewritten, because TIMESTAMP_LTZ data type 
> does not support `LocalDateTime` or `java.sql.Timestamp` as conversion class.
> The first approach is to support the two conversion classes  for 
> TIMESTAMP_LTZ  data type, to obtain the correct result, the local time zone 
> information is necessary when conversion happens between  SQL internal data 
> structure `TimestampData` and external conversion class `LocalDateTime` or 
> `java.sql.Timestamp`.
> In this approach, I made a POC, I found that there are more changes than we 
> thought before. It is difficult to cover with tests and it is easy to 
> introduce bugs.
> Thus, to resolve the UDF compatibility issue, we consider support the 



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

Reply via email to