docete commented on a change in pull request #10727: 
[FLINK-15420][table-planner-blink] Cast string to timestamp will loos…
URL: https://github.com/apache/flink/pull/10727#discussion_r362363995
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
 ##########
 @@ -253,7 +254,13 @@ public static SqlTimestamp toSqlTimestamp(String dateStr, 
String format) {
                                return SqlTimestamp.fromLocalDateTime(ldt);
                        }
                } catch (DateTimeParseException e) {
-                       return null;
+                       // fall back to support cases like '1999-9-10 05:20:10'
+                       try {
+                               Timestamp ts = Timestamp.valueOf(dateStr);
 
 Review comment:
   So what's your opinion about the exceptions? Just throw them out (like 
calcite)?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to