morrySnow commented on code in PR #49461:
URL: https://github.com/apache/doris/pull/49461#discussion_r2021270149
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubExprAnalyzer.java:
##########
@@ -268,6 +284,26 @@ private static <T> boolean
hasCorrelatedSlotsUnderNode(Plan rootPlan,
return false;
}
+ private static <T> boolean hasCorrelatedSlotsInNode(Plan rootPlan,
+
ImmutableSet<Slot> slots, Class<T> clazz) {
+ ArrayDeque<Plan> planQueue = new ArrayDeque<>();
+ planQueue.add(rootPlan);
+ while (!planQueue.isEmpty()) {
+ Plan plan = planQueue.poll();
+ if (plan.getClass().equals(clazz)) {
+ if (plan.getExpressions().stream().anyMatch(expression ->
!Sets
Review Comment:
this check is very expansive, could we have a lighter way to check it?
--
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]