yujun777 commented on code in PR #71034:
URL: https://github.com/apache/doris/pull/71034#discussion_r4751593937
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -827,6 +830,27 @@ private ExprSubstitutionMap createPointQueryProjectionSmap(
return substitutionMap;
}
+ @Override
+ protected PlanNode findFirstMatching(Predicate<? super TreeNode<PlanNode>>
predicate) {
+ // Exchanges for different CTE consumers can share the same producer
root.
+ Set<PlanNode> visited = Sets.newIdentityHashSet();
+ Deque<PlanNode> pending = new ArrayDeque<>();
+ pending.push(this);
+ while (!pending.isEmpty()) {
+ PlanNode node = pending.pop();
+ if (!visited.add(node)) {
+ continue;
+ }
+ if (predicate.test(node)) {
+ return node;
+ }
+ for (int i = node.children.size() - 1; i >= 0; i--) {
Review Comment:
ignore, no too many union all
--
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]