laglangyue commented on code in PR #2637:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2637#discussion_r962475410


##########
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);

Review Comment:
   > how about like this? `(int) 
((Date.valueOf(String.valueOf(val))).toLocalDate().toEpochDay());`
   the date value in seatunal is LocalDate,we don't need to transform  like 
`obj->string->date->localdate`



-- 
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]

Reply via email to