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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java:
##########
@@ -650,6 +651,15 @@ public Expression 
visitComparisonPredicate(ComparisonPredicate cp, ExpressionRew
         // Used to replace expression in ShortCircuit plan
         registerPlaceholderIdToSlot(cp, context, left, right);
         cp = (ComparisonPredicate) cp.withChildren(left, right);
+        if (cp.containsType(SubqueryExpr.class) && 
getScope().getOuterScope().isPresent()) {

Review Comment:
   add ut to check it maybe efficient



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java:
##########
@@ -698,6 +708,16 @@ public Expression visitInSubquery(InSubquery inSubquery, 
ExpressionRewriteContex
         } else {
             newCompareExpr = afterTypeCoercion.left();
         }
+        if (getScope().getOuterScope().isPresent()) {

Review Comment:
   ditto



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java:
##########
@@ -650,6 +651,15 @@ public Expression 
visitComparisonPredicate(ComparisonPredicate cp, ExpressionRew
         // Used to replace expression in ShortCircuit plan
         registerPlaceholderIdToSlot(cp, context, left, right);
         cp = (ComparisonPredicate) cp.withChildren(left, right);
+        if (cp.containsType(SubqueryExpr.class) && 
getScope().getOuterScope().isPresent()) {

Review Comment:
   we should enum all place that comaprison predicate could appear and test 
them to make should we could process all situation correctly



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