danny0405 commented on a change in pull request #2923:
URL: https://github.com/apache/hudi/pull/2923#discussion_r646240607



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/util/StringToRowDataConverter.java
##########
@@ -85,7 +87,8 @@ private static Converter getConverter(LogicalType 
logicalType) {
         // see HoodieAvroUtils#convertValueForAvroLogicalTypes
         return field -> (int) LocalDate.parse(field).toEpochDay();
       case TIMESTAMP_WITHOUT_TIME_ZONE:
-        return field -> TimestampData.fromEpochMillis(Long.parseLong(field));
+        // see HoodieAvroUtils#convertValueForAvroLogicalTypes
+        return field -> 
TimestampData.fromEpochMillis(LocalDateTime.parse(field).atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());

Review comment:
       Why we need this change, is it related with this patch ? And the change 
is wrong because the string format is already in epoch milliseconds but not the 
format `DateTimeFormatter.ISO_LOCAL_DATE_TIME`.




-- 
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:
us...@infra.apache.org


Reply via email to