Skip to content

Commit defcbcd

Browse files
committed
remove rdb predicate pushdown
1 parent 07a69af commit defcbcd

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

impala/impala-side/impala-async-side/src/main/java/com/dtstack/flink/sql/side/impala/ImpalaAsyncSideInfo.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ public void buildEqualInfo(JoinInfo joinInfo, SideTableInfo sideTableInfo) {
6464
dealOneEqualCon(sqlNode, sideTableName);
6565
}
6666

67-
List<String> whereConditionList = Lists.newArrayList();;
68-
Map<String, String> physicalFields = impalaSideTableInfo.getPhysicalFields();
69-
SqlNode whereNode = ((SqlSelect) joinInfo.getSelectNode()).getWhere();
70-
if (whereNode != null) {
71-
// 解析维表中的过滤条件
72-
ParseUtils.parseSideWhere(whereNode, physicalFields, whereConditionList);
73-
}
74-
7567
sqlCondition = "select ${selectField} from ${tableName} where ";
7668
for (int i = 0; i < equalFieldList.size(); i++) {
7769
String equalField = sideTableInfo.getPhysicalFields().getOrDefault(equalFieldList.get(i), equalFieldList.get(i));
@@ -81,18 +73,6 @@ public void buildEqualInfo(JoinInfo joinInfo, SideTableInfo sideTableInfo) {
8173
sqlCondition += " and ";
8274
}
8375
}
84-
if (0 != whereConditionList.size()) {
85-
// 如果where条件中第一个符合条件的是维表中的条件
86-
String firstCondition = whereConditionList.get(0);
87-
if (!"and".equalsIgnoreCase(firstCondition) && !"or".equalsIgnoreCase(firstCondition)) {
88-
whereConditionList.add(0, "and (");
89-
} else {
90-
whereConditionList.add(1, "(");
91-
}
92-
whereConditionList.add(whereConditionList.size(), ")");
93-
sqlCondition += String.join(" ", whereConditionList);
94-
}
95-
9676
sqlCondition = sqlCondition.replace("${tableName}", impalaSideTableInfo.getTableName()).replace("${selectField}", sideSelectFields);
9777

9878
boolean enablePartiton = impalaSideTableInfo.isEnablePartition();

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ public void buildEqualInfo(JoinInfo joinInfo, SideTableInfo sideTableInfo) {
7272
dealOneEqualCon(sqlNode, sideTableName);
7373
}
7474

75-
List<String> whereConditionList = Lists.newArrayList();;
76-
Map<String, String> physicalFields = rdbSideTableInfo.getPhysicalFields();
77-
SqlNode whereNode = ((SqlSelect) joinInfo.getSelectNode()).getWhere();
78-
if (whereNode != null) {
79-
// 解析维表中的过滤条件
80-
ParseUtils.parseSideWhere(whereNode, physicalFields, whereConditionList);
81-
}
82-
8375
sqlCondition = "select ${selectField} from ${tableName} where ";
8476
for (int i = 0; i < equalFieldList.size(); i++) {
8577
String equalField = sideTableInfo.getPhysicalFields().getOrDefault(equalFieldList.get(i), equalFieldList.get(i));
@@ -89,17 +81,6 @@ public void buildEqualInfo(JoinInfo joinInfo, SideTableInfo sideTableInfo) {
8981
sqlCondition += " and ";
9082
}
9183
}
92-
if (0 != whereConditionList.size()) {
93-
// 如果where条件中第一个符合条件的是维表中的条件
94-
String firstCondition = whereConditionList.get(0);
95-
if (!"and".equalsIgnoreCase(firstCondition) && !"or".equalsIgnoreCase(firstCondition)) {
96-
whereConditionList.add(0, "and (");
97-
} else {
98-
whereConditionList.add(1, "(");
99-
}
100-
whereConditionList.add(whereConditionList.size(), ")");
101-
sqlCondition += String.join(" ", whereConditionList);
102-
}
10384

10485
sqlCondition = sqlCondition.replace("${tableName}", rdbSideTableInfo.getTableName()).replace("${selectField}", sideSelectFields);
10586

0 commit comments

Comments
 (0)