yangzhg commented on a change in pull request #3625:
URL: https://github.com/apache/incubator-doris/pull/3625#discussion_r428011341



##########
File path: fe/src/main/java/org/apache/doris/analysis/CaseExpr.java
##########
@@ -191,7 +191,7 @@ public void analyzeImpl(Analyzer analyzer) throws 
AnalysisException {
                 throw new AnalysisException("Subquery in case-when must return 
scala type");
             }
             if (whenExpr.contains(Predicates.instanceOf(Subquery.class))
-                    && !((hasCaseExpr() && whenExpr instanceof Subquery || 
whenExpr instanceof BinaryPredicate))) {
+                    && !((hasCaseExpr() && whenExpr instanceof Subquery || 
!checkSubquery(whenExpr)))) {
                 throw new AnalysisException("Only support subquery in binary 
predicate in case statement.");

Review comment:
       Instead of deleting BinaryPredicate, we still only support 
BinaryPredicate, but just adjust the check of BinaryPredicate from the first 
layer to support check of children of other expr




----------------------------------------------------------------
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.

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