Skip to content

Commit c2b6e6e

Browse files
committed
[fix-32725][jdbcwriter] updateKey不是必选的,放开限制
1 parent 608b9b7 commit c2b6e6e

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

flinkx-rdb/flinkx-rdb-writer/src/main/java/com/dtstack/flinkx/rdb/outputformat/JdbcOutputFormatBuilder.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ protected void checkFormat() {
116116
if (format.driverName == null) {
117117
throw new IllegalArgumentException("No driver supplied");
118118
}
119-
//如果设置了主键冲突 进行更新mode,则需要判断updateKey是否是存在的 并且里面的key是否是存在的
120-
if(format.mode.equalsIgnoreCase(EWriteMode.UPDATE.name())){
121-
if( MapUtils.isEmpty(format.updateKey) || CollectionUtils.isEmpty(format.updateKey.values())){
122-
throw new IllegalArgumentException("updateKey must not null when mode is on duplicate key update");
123-
}else{
124-
Set<String> indexColumns = new HashSet<>();
125-
for (List<String> value : format.updateKey.values()) {
126-
indexColumns.addAll(value);
127-
}
128-
if(CollectionUtils.isEmpty(indexColumns)){
129-
throw new IllegalArgumentException("updateKey must not null when mode is on duplicate key update");
130-
}
131-
}
132-
}
133119

134120
if(format.getRestoreConfig().isRestore() && format.getBatchInterval() == 1){
135121
throw new IllegalArgumentException("Batch Size must greater than 1 when checkpoint is open");

0 commit comments

Comments
 (0)