Skip to content

Commit b89cd9c

Browse files
committed
[hotfix-35464][side-table] The side table will throw an exception when the [primary key] is null
1 parent 88d1230 commit b89cd9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818

1919
package com.dtstack.flink.sql.table;
2020

21+
import com.dtstack.flink.sql.side.AbstractSideTableInfo;
2122
import com.google.common.collect.Lists;
2223
import com.google.common.collect.Maps;
2324

2425
import java.io.Serializable;
2526
import java.util.List;
2627
import java.util.Map;
28+
import java.util.Objects;
2729

2830
/**
2931
* Reason:
@@ -84,6 +86,10 @@ public Class<?>[] getFieldClasses() {
8486
}
8587

8688
public List<String> getPrimaryKeys() {
89+
if (this instanceof AbstractSideTableInfo &&
90+
Objects.isNull(primaryKeys)) {
91+
throw new IllegalArgumentException("Side table must contain [primary key]!");
92+
}
8793
return primaryKeys;
8894
}
8995

0 commit comments

Comments
 (0)