Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
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, after a e2e POC, we 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 implicit cast conversion between timestamp and timestamp_ltz after some offline discuss with jark and ykt836,
This way is clean and lightweight way to resolve the UDF compatibility issue and doesn't change any public interface as well. BTW the implicit cast conversion is supported in Oracle[1]
[1]https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch4datetime.htm
Attachments
Issue Links
- links to