You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "maruko-code (via GitHub)" <gi...@apache.org> on 2023/01/31 07:01:30 UTC

[GitHub] [incubator-seatunnel] maruko-code commented on a diff in pull request #4009: [Improve][Connector-V2][maxcompute] spark engine support date type

maruko-code commented on code in PR #4009:
URL: https://github.com/apache/incubator-seatunnel/pull/4009#discussion_r1091523350


##########
seatunnel-translation/seatunnel-translation-spark/seatunnel-translation-spark-common/src/main/java/org/apache/seatunnel/translation/spark/common/serialization/InternalRowConverter.java:
##########
@@ -76,7 +77,11 @@ private static Object convert(Object field, SeaTunnelDataType<?> dataType) {
                 SeaTunnelRowType rowType = (SeaTunnelRowType) dataType;
                 return convert(seaTunnelRow, rowType);
             case DATE:
-                return (int) ((LocalDate) field).toEpochDay();
+                if (field instanceof Date ){

Review Comment:
   done



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org