Skip to content

Commit 003b35e

Browse files
committed
[hotfix-33089][core]optimize parseFieldsInfo method.
1 parent 4e5b3f7 commit 003b35e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,8 @@ public void parseFieldsInfo(String fieldsInfo, AbstractTableInfo tableInfo) {
119119
*/
120120
if (tableInfo instanceof AbstractSideTableInfo) {
121121
tableInfo.getPrimaryKeys().stream()
122-
.filter(pk -> !tableInfo.getFieldList().contains(pk))
123-
.forEach(pk -> {
124-
try {
125-
handleKeyNotHaveAlias(String.format("%s varchar", pk), tableInfo);
126-
} catch (Exception e) {
127-
LOG.error(String.format("Handle primary key failed. Reason: %s", e.getMessage()));
128-
}
129-
});
122+
.filter(pk -> (!tableInfo.getFieldList().contains(pk) && pk.equals("rowkey")))
123+
.forEach(pk -> handleKeyNotHaveAlias(String.format("%s varchar", pk), tableInfo));
130124
}
131125

132126
tableInfo.finish();

0 commit comments

Comments
 (0)