Mrart commented on code in PR #4108:
URL: https://github.com/apache/flink-cdc/pull/4108#discussion_r2297987023
##########
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) {
Review Comment:
As postgres sql type int[][] , the element is null, but I think It can pass
and return value 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]