Skip to content

Commit 80f3437

Browse files
committed
Merge branch 'v1.8.0_name_redundancy' into 'v1.8.0_dev'
对建表语句中重复字段名进行检查 See merge request !128
2 parents d44b9b9 + 0ee478d commit 80f3437

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/java/com/dtstack/flink/sql/table/TableInfo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ public void setParallelism(Integer parallelism) {
118118
}
119119

120120
public void addField(String fieldName){
121+
if (fieldList.contains(fieldName)) {
122+
throw new RuntimeException("redundancy field name " + fieldName + " in table " + getName());
123+
}
124+
121125
fieldList.add(fieldName);
122126
}
123127

0 commit comments

Comments
 (0)