Skip to content

Commit f5ed477

Browse files
JohnZpJohnZp
andauthored
[Fix]: fix the cdc bug about NPE when the original table deletes a field (#5579)
Co-authored-by: JohnZp <johnzp1109@github.com>
1 parent 4117335 commit f5ed477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializationConverters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public SeaTunnelRow convert(SourceRecord record, Struct struct, Schema schema)
8181
// physical column
8282
for (int i = 0; i < physicalConverters.length; i++) {
8383
String fieldName = fieldNames[i];
84-
Object fieldValue = struct.get(fieldName);
8584
Field field = schema.field(fieldName);
8685
if (field == null) {
8786
row.setField(i, null);
8887
} else {
88+
Object fieldValue = struct.get(fieldName);
8989
Schema fieldSchema = field.schema();
9090
Object convertedField =
9191
SeaTunnelRowDebeziumDeserializationConverters.convertField(

0 commit comments

Comments
 (0)