Skip to content

Commit 24cef8c

Browse files
committed
[hotfix-36521][async-base] 修复如下场景:假设SQL中有三个主键[a, b, c],同时主键[b]的值为null,那么inputParams中只会有主键[a]的值,主键[b, c]都不包含,导致后面rdb 维表替换where 条件时缺少 value,查询SQL 执行失败
1 parent ce250fb commit 24cef8c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

core/src/main/java/com/dtstack/flink/sql/side/BaseAsyncReqRow.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ private Map<String, Object> parseInputParam(BaseRow input) {
201201
for (int i = 0; i < sideInfo.getEqualValIndex().size(); i++) {
202202
Integer conValIndex = sideInfo.getEqualValIndex().get(i);
203203
Object equalObj = genericRow.getField(conValIndex);
204-
if (equalObj == null) {
205-
return inputParams;
206-
}
204+
// comment by tiezhu
205+
// 假设SQL中有三个主键[a, b, c],同时主键[b]的值为null,那么
206+
// inputParams中只会有主键[a]的值,主键[b, c]都不包含,导致
207+
// 后面rdb 维表替换where 条件时缺少 value,查询SQL 执行失败
208+
// if (equalObj == null) {
209+
// return inputParams;
210+
// }
207211
String columnName = sideInfo.getEqualFieldList().get(i);
208212
inputParams.put(columnName, equalObj);
209213
}

0 commit comments

Comments
 (0)