Skip to content

Commit 9bb6565

Browse files
committed
[fix-32324][rdb-all]修复rdb全量维表字段匹配异常,异常情况:DDL中字段为id, name, age, 只SELECT id, age两个字段
1 parent 76f133f commit 9bb6565

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/all/AbstractRdbAllReqRow.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ private void queryAndFillData(Map<String, List<Map<String, Object>>> tmpCache, C
169169

170170
String[] sideFieldNames = StringUtils.split(sideInfo.getSideSelectFields(), ",");
171171
String[] sideFieldTypes = sideInfo.getSideTableInfo().getFieldTypes();
172+
String[] fields = sideInfo.getSideTableInfo().getFields();
172173
Map<String, String> sideFieldNamesAndTypes = Maps.newHashMap();
173-
for (int i = 0; i < sideFieldNames.length; i++) {
174-
sideFieldNamesAndTypes.put(sideFieldNames[i], sideFieldTypes[i]);
174+
for (int i = 0; i < fields.length; i++) {
175+
sideFieldNamesAndTypes.put(fields[i], sideFieldTypes[i]);
175176
}
176177

177178
while (resultSet.next()) {

0 commit comments

Comments
 (0)