morrySnow commented on code in PR #44365:
URL: https://github.com/apache/doris/pull/44365#discussion_r1862896242
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubExprAnalyzer.java:
##########
@@ -205,19 +205,13 @@ private AnalyzedResult analyzeSubquery(SubqueryExpr expr)
{
}
CascadesContext subqueryContext =
CascadesContext.newContextWithCteContext(
cascadesContext, expr.getQueryPlan(),
cascadesContext.getCteContext());
- Scope subqueryScope = genScopeWithSubquery(expr);
+ Scope subqueryScope = new Scope(getScope().getOuterScope(),
getScope().getSlots());
subqueryContext.setOuterScope(subqueryScope);
Review Comment:
```suggestion
subqueryContext.setOuterScope(getScope());
```
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java:
##########
@@ -781,8 +781,9 @@ private UnboundFunction
bindHighOrderFunction(UnboundFunction unboundFunction, E
.map(ArrayItemReference::toSlot)
.collect(ImmutableList.toImmutableList());
- ExpressionAnalyzer lambdaAnalyzer = new
ExpressionAnalyzer(currentPlan, new Scope(boundedSlots),
- context == null ? null : context.cascadesContext, true, false)
{
+ ExpressionAnalyzer lambdaAnalyzer = new
ExpressionAnalyzer(currentPlan, new Scope(Optional.of(getScope()),
Review Comment:
```suggestion
ExpressionAnalyzer lambdaAnalyzer = new
ExpressionAnalyzer(currentPlan, getScope(),
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]