KurtYoung commented on a change in pull request #15356:
URL: https://github.com/apache/flink/pull/15356#discussion_r601006233
##########
File path:
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvRowDeserializationSchema.java
##########
@@ -316,7 +321,11 @@ private static RuntimeConverter createRuntimeConverter(
} else if (info.equals(Types.LOCAL_TIME)) {
return (node) -> Time.valueOf(node.asText()).toLocalTime();
} else if (info.equals(Types.LOCAL_DATE_TIME)) {
- return (node) ->
Timestamp.valueOf(node.asText()).toLocalDateTime();
+ return (node) -> LocalDateTime.parse(node.asText(),
SQL_TIMESTAMP_FORMAT);
+ } else if (info.equals(Types.INSTANT)) {
+ return (node) ->
+ LocalDateTime.parse(node.asText(),
SQL_TIMESTAMP_WITH_LOCAL_TIMEZONE_FORMAT)
+ .toInstant(ZoneOffset.UTC);
Review comment:
I'm not sure we can use UTC here.
--
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]