You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/29 04:05:48 UTC

[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #2938: [SeaTunnel][Flink]use PrimitiveArrayTypeInfo replace basictypeinfo.

Hisoka-X commented on code in PR #2938:
URL: https://github.com/apache/incubator-seatunnel/pull/2938#discussion_r983043738


##########
seatunnel-translation/seatunnel-translation-base/src/main/java/org/apache/seatunnel/translation/serialization/RowConverter.java:
##########
@@ -80,8 +82,9 @@ protected boolean validate(Object field, SeaTunnelDataType<?> dataType) {
             case STRING:
             case DECIMAL:
             case BYTES:
-            case ARRAY:
                 return dataType.getTypeClass() == field.getClass();
+            case ARRAY:
+                return ClassUtils.wrapperToPrimitive(dataType.getTypeClass().getComponentType()) == field.getClass().getComponentType();

Review Comment:
   If source produce References Array, seem like the logic will return false.



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