morrySnow commented on code in PR #20599:
URL: https://github.com/apache/doris/pull/20599#discussion_r1230347684


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java:
##########
@@ -1263,6 +1269,9 @@ private void analyzeAggregation(Analyzer analyzer) throws 
AnalysisException {
                 havingClauseAfterAnaylzed = havingClause.substitute(aliasSMap, 
analyzer, false);
             }
             havingClauseAfterAnaylzed = 
rewriteQueryExprByMvColumnExpr(havingClauseAfterAnaylzed, analyzer);
+            if (havingClauseAfterAnaylzed.getType().isTinyint()) {

Review Comment:
   i think it should be `!isBoolean()`



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java:
##########
@@ -851,6 +852,11 @@ private void whereClauseRewrite() {
             } else {
                 whereClause = new BoolLiteral(true);
             }
+        } else if (whereClause instanceof CaseExpr
+                && (((CaseExpr) whereClause).getChild(1) instanceof IntLiteral)
+                && (((CaseExpr) whereClause).getChild(2) instanceof 
IntLiteral)) {
+            whereClause = new CastExpr(TypeDef.create(PrimitiveType.BOOLEAN), 
whereClause);
+            whereClause.setType(Type.BOOLEAN);

Review Comment:
   all whereClause should boolean type, so do not only process case when



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to