Skip to content

Commit 31355e7

Browse files
committed
[FLINK-38839][runtime] Use constructor chaining in TransformDef
Use this(...) constructor chaining instead of duplicating field assignments for better code maintainability.
1 parent 32cd225 commit 31355e7

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

flink-cdc-composer/src/main/java/org/apache/flink/cdc/composer/definition/TransformDef.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,25 @@ public TransformDef(
7272
this.description = description;
7373
this.postTransformConverter = postTransformConverter;
7474
}
75-
75+
public TransformDef(
76+
String sourceTable,
77+
String projection,
78+
String filter,
79+
String primaryKeys,
80+
String partitionKeys,
81+
String tableOptions,
82+
String description,
83+
String postTransformConverter){
84+
this.sourceTable = sourceTable;
85+
this.projection = projection;
86+
this.filter = filter;
87+
this.primaryKeys = primaryKeys;
88+
this.partitionKeys = partitionKeys;
89+
this.tableOptions = tableOptions;
90+
this.tableOptionsDelimiter = ",";
91+
this.description = description;
92+
this.postTransformConverter = postTransformConverter;
93+
}
7694
public String getSourceTable() {
7795
return sourceTable;
7896
}

0 commit comments

Comments
 (0)