924060929 commented on code in PR #11454:
URL: https://github.com/apache/doris/pull/11454#discussion_r936288710


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSlotReference.java:
##########
@@ -156,7 +179,12 @@ public Expression visitUnboundAlias(UnboundAlias 
unboundAlias, Void context) {
         }
 
         @Override
-        public Slot visitUnboundSlot(UnboundSlot unboundSlot, Void context) {
+        public Slot visitUnboundSlot(UnboundSlot unboundSlot, PlannerContext 
context) {
+            List<Slot> tmpBound = bindSlot(unboundSlot, getScope().getSlots());
+            boolean hasCorrelate = false;

Review Comment:
   this position should has a variable named as `boolean foundInThisScope = 
!tmpBound.isEmpty()`;
   and if foundInThisScope is false, then find in outerScope, if found in 
outerScope, then set `boolean foundInOuterScope = true`.
   
   and then is the switch statement, you can declare `boolean hasCorrelate = 
foundInOuterScope` or use `foundInOuterScope` directly



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