raminqaf commented on code in PR #27793:
URL: https://github.com/apache/flink/pull/27793#discussion_r2975337529
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/ToTimestampFunction.java:
##########
@@ -54,7 +56,11 @@ public
ToTimestampFunction(SpecializedFunction.SpecializedContext context) {
return null;
}
- return parseTimestampData(timestamp.toString());
+ try {
+ return parseTimestampData(timestamp.toString());
+ } catch (DateTimeException e) {
+ return null;
+ }
Review Comment:
@twalthr & @snuyanzin
I have added this because of this test:
https://github.com/raminqaf/flink/blob/afe6ef9fb08016e6d7ef3a60421f7f1b7034dc7d/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala#L1009-L1009
Currently for the `TO_TIMESTAMP_LTZ('abc')` function we are not returning
`null` but throw an exception. Should this be handled to return null?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]