Skip to content

Commit

Permalink
[Hotfix][SqlServer CDC] fix SqlServerCDC IT failure (apache#3807)
Browse files Browse the repository at this point in the history
  • Loading branch information
ic4y authored and lhyundeadsoul committed Jan 3, 2023
1 parent 559473d commit 9765426
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public static boolean isSchemaChangeEvent(SourceRecord sourceRecord) {
public static boolean isDataChangeRecord(SourceRecord record) {
Schema valueSchema = record.valueSchema();
Struct value = (Struct) record.value();
return valueSchema.field(Envelope.FieldName.OPERATION) != null
return valueSchema != null
&& valueSchema.field(Envelope.FieldName.OPERATION) != null
&& value.getString(Envelope.FieldName.OPERATION) != null;
}

Expand Down

0 comments on commit 9765426

Please sign in to comment.