Skip to content

Commit

Permalink
[cdc-common] Support adding Column directly in schema builder
Browse files Browse the repository at this point in the history
This closes apache#2739
  • Loading branch information
PatrickRen committed Nov 23, 2023
1 parent b4deda9 commit 15393eb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ public Builder metadataColumn(
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.");
Expand Down

0 comments on commit 15393eb

Please sign in to comment.