Mrart commented on code in PR #4108:
URL: https://github.com/apache/flink-cdc/pull/4108#discussion_r2297445846


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-debezium/src/main/java/org/apache/flink/cdc/debezium/event/DebeziumEventDeserializationSchema.java:
##########
@@ -472,6 +482,57 @@ protected Object convertToMap(Object dbzObj, Schema 
schema) throws Exception {
         return new GenericMapData(convertedMap);
     }
 
+    protected Object convertToArray(Object dbzObj, Schema schema) throws 
Exception {
+        if (dbzObj == null) {
+            return null;
+        }
+
+        Schema elementSchema = schema.valueSchema();
+        DataType elementType = schemaDataTypeInference.infer(null, 
elementSchema);
+        DeserializationRuntimeConverter elementConverter = 
createConverter(elementType);
+
+        if (dbzObj instanceof java.util.List) {
+            java.util.List<?> list = (java.util.List<?>) dbzObj;
+            Object[] array = new Object[list.size()];
+
+            for (int i = 0; i < list.size(); i++) {
+                Object element = list.get(i);
+                if (element != null) {
+                    if (elementSchema.type() == Schema.Type.ARRAY) {
+                        array[i] = convertToArray(element, elementSchema);

Review Comment:
   but  only debezium  2.x can supported nested array,I have test matrix  
int[][] ,debezium return data 'null'



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