dybyte commented on code in PR #9881:
URL: https://github.com/apache/seatunnel/pull/9881#discussion_r2386853696


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java:
##########
@@ -342,6 +346,13 @@ private int getBytesForValue(Object v) {
                 }
                 return rowSize;
             default:
+                if (v.getClass().isArray() && v instanceof Object[]) {

Review Comment:
   I think we cannot move this logic into a specific case because the handling 
here is for generic object arrays, which may not fit cleanly into the existing 
cases.



##########
seatunnel-e2e/seatunnel-transforms-v2-e2e/seatunnel-transforms-v2-e2e-part-2/src/test/resources/sql_transform/nested_type.conf:
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+######
+###### This config file is a demonstration of streaming processing in 
seatunnel config
+######
+
+env {
+  job.mode = "BATCH"
+}
+
+source {
+  FakeSource {
+    plugin_output = "fake"
+    row.num = 1
+    string.template = ["nestedType"]
+    schema = {
+      fields {
+        name = "string"
+      }
+    }
+  }
+}
+
+transform {
+  Sql {
+    plugin_input = "fake"
+    plugin_output = "tmp_nested"
+    query = """
+      select
+        ARRAY(ARRAY(ARRAY(1,2,3), ARRAY(4,5,6), ARRAY(ARRAY(1,2,3), 
ARRAY(4,5,6)), ARRAY(3, 4))) as arr_of_arr,
+        MAP('k', MAP('k', MAP('k', 1))) as map_of_map,
+        ARRAY(MAP('k', 1), MAP('k2', ARRAY(1, 2))) as arr_of_map,
+        MAP('k', ARRAY(1, 2)) as map_of_arr
+      from dual
+    """
+  }
+}
+
+sink {
+  Console {
+    plugin_input = "tmp_nested"
+  }

Review Comment:
   It seems that nested types are not yet supported in assert sink. I think 
this is related to #9747 . Could you please confirm if this is correct?



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