XieJiann commented on code in PR #23598:
URL: https://github.com/apache/doris/pull/23598#discussion_r1322851924


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java:
##########
@@ -752,20 +753,22 @@ private void 
checkIfOutputAliasNameDuplicatedForGroupBy(List<Expression> express
         }
     }
 
-    private <E extends Expression> E checkBound(E expression, Plan plan) {
-        expression.foreachUp(e -> {
-            if (e instanceof UnboundSlot) {
-                UnboundSlot unboundSlot = (UnboundSlot) e;
-                String tableName = 
StringUtils.join(unboundSlot.getQualifier(), ".");
-                if (tableName.isEmpty()) {
-                    tableName = "table list";
-                }
-                throw new AnalysisException("Unknown column '"
-                        + 
unboundSlot.getNameParts().get(unboundSlot.getNameParts().size() - 1)
-                        + "' in '" + tableName + "' in "
-                        + 
plan.getType().toString().substring("LOGICAL_".length()) + " clause");
+    private <E extends Expression> E checkBoundExceptLambda(E expression, Plan 
plan) {
+        if (expression instanceof Lambda) {
+            return expression;
+        }
+        if (expression instanceof UnboundSlot) {
+            UnboundSlot unboundSlot = (UnboundSlot) expression;
+            String tableName = StringUtils.join(unboundSlot.getQualifier(), 
".");
+            if (tableName.isEmpty()) {
+                tableName = "table list";
             }
-        });
+            throw new AnalysisException("Unknown column '"
+                    + 
unboundSlot.getNameParts().get(unboundSlot.getNameParts().size() - 1)
+                    + "' in '" + tableName + "' in "
+                    + plan.getType().toString().substring("LOGICAL_".length()) 
+ " clause");
+        }
+        expression.children().forEach(e -> checkBoundExceptLambda(e, plan));

Review Comment:
   done



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