liugddx commented on code in PR #2637:
URL:
https://github.com/apache/incubator-seatunnel/pull/2637#discussion_r962440330
##########
seatunnel-translation/seatunnel-translation-spark/seatunnel-translation-spark-common/src/main/java/org/apache/seatunnel/translation/spark/common/serialization/InternalRowConverter.java:
##########
@@ -164,11 +168,11 @@ private static Object reconvert(Object field,
SeaTunnelDataType<?> dataType) {
case ROW:
return reconvert((InternalRow) field, (SeaTunnelRowType)
dataType);
case DATE:
- return ((Date) field).toLocalDate();
+ return LocalDate.ofEpochDay((int) field);
case TIME:
- return ((Timestamp) field).toLocalDateTime().toLocalTime();
+ return LocalDateTime.ofInstant(Instant.ofEpochMilli((long)
field), ZONE_UTC).toLocalTime();
case TIMESTAMP:
- return ((Timestamp) field).toLocalDateTime();
+ return LocalDateTime.ofInstant(Instant.ofEpochMilli((long)
field), ZONE_UTC);
Review Comment:
Can the accuracy of TimesStamp accurately be precise?
--
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]