[cdc-common] Support adding Column directly in schema builder

This closes #2739
pull/2749/head
Qingsheng Ren 1 year ago committed by Leonard Xu
parent 51554d8630
commit 6506ba788d

@ -298,6 +298,12 @@ public class Schema implements Serializable {
return this;
}
public Builder column(Column column) {
checkColumn(column.getName(), column.getType());
columns.add(column);
return this;
}
private void checkColumn(String columnName, DataType type) {
Preconditions.checkNotNull(columnName, "Column name must not be null.");
Preconditions.checkNotNull(type, "Data type must not be null.");

Loading…
Cancel
Save