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/10/17 03:16:03 UTC

[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #3047: [Improve] [Connector-V2-Clickhouse] Support nest type and array

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


##########
seatunnel-translation/seatunnel-translation-spark/seatunnel-translation-spark-common/src/main/java/org/apache/seatunnel/translation/spark/common/serialization/InternalRowConverter.java:
##########
@@ -216,4 +213,31 @@ private static SeaTunnelRow reconvert(InternalRow engineRow, SeaTunnelRowType ro
         }
         return new SeaTunnelRow(fields);
     }
+
+    private static Object reconvertArray(Object field, SeaTunnelDataType<?> dataType) {
+        BasicType<?> elementType = ((ArrayType<?, ?>) dataType).getElementType();
+        Object[] objectArray = ((ArrayData) field).toObjectArray(TypeConverterUtils.convert(elementType));
+        switch (elementType.getSqlType()) {

Review Comment:
   Why we need copy data from array to another array?



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