Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuangchong committed Apr 7, 2024
1 parent e4ae4d2 commit a1080a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void processElement(T raw, Context context, Collector<Void> collector) th
});

List<DataField> schemaChange = parser.parseSchemaChange();
if (schemaChange.size() > 0) {
if (!schemaChange.isEmpty()) {
context.output(
DYNAMIC_SCHEMA_CHANGE_OUTPUT_TAG,
Tuple2.of(Identifier.create(database, tableName), schemaChange));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.paimon.types.DataField;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

Expand All @@ -35,7 +36,7 @@ public void setRawEvent(RichCdcRecord rawEvent) {

@Override
public List<DataField> parseSchemaChange() {
return record.fields();
return new ArrayList<>(record.fields());
}

@Override
Expand Down

0 comments on commit a1080a6

Please sign in to comment.