Skip to content

Commit c7f2f10

Browse files
committed
关系型数据库谓词下推
1 parent ccc6e1a commit c7f2f10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/async/RdbAsyncSideInfo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ public void buildEqualInfo(JoinInfo joinInfo, SideTableInfo sideTableInfo) {
9393
// 如果where条件中第一个符合条件的是维表中的条件
9494
String firstCondition = whereConditionList.get(0);
9595
if (!"and".equalsIgnoreCase(firstCondition) && !"or".equalsIgnoreCase(firstCondition)) {
96-
sqlCondition += " and ";
96+
whereConditionList.add(0, "and (");
97+
} else {
98+
whereConditionList.add(1, "(");
9799
}
100+
whereConditionList.add(whereConditionList.size(), ")");
98101
sqlCondition += String.join(" ", whereConditionList);
99102
}
100103

0 commit comments

Comments
 (0)