This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0894848 fix having clause constant folding (#7507)
0894848 is described below
commit 0894848045e1052e505cdb3200e0961724d840e6
Author: qiye <[email protected]>
AuthorDate: Thu Dec 30 10:22:07 2021 +0800
fix having clause constant folding (#7507)
Change-Id: I49d7f2b17e498e8b393a8c67d85aa1196f961393
Co-authored-by: qijianliang01 <[email protected]>
---
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java
index 0c25894..88b9e2f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java
@@ -1394,8 +1394,8 @@ public class SelectStmt extends QueryStmt {
}
if (havingClause != null) {
- registerExprId(havingClause);
- exprMap.put(havingClause.getId().toString(), havingClause);
+ registerExprId(havingClauseAfterAnaylzed);
+ exprMap.put(havingClauseAfterAnaylzed.getId().toString(),
havingClauseAfterAnaylzed);
havingClauseAfterAnaylzed.collect(Subquery.class, subqueryExprs);
}
for (Subquery subquery : subqueryExprs) {
@@ -1501,7 +1501,7 @@ public class SelectStmt extends QueryStmt {
whereClause.collect(Subquery.class, subqueryExprs);
}
if (havingClause != null) {
- havingClause =
rewrittenExprMap.get(havingClause.getId().toString());
+ havingClause =
rewrittenExprMap.get(havingClauseAfterAnaylzed.getId().toString());
havingClauseAfterAnaylzed.collect(Subquery.class, subqueryExprs);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]