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


##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -1109,6 +1117,18 @@ protected Pair<PlanNode, LocalExchangeType> 
enforceRequire(
         Pair<PlanNode, LocalExchangeType> childOutput =
                 child.enforceAndDeriveLocalExchange(translatorContext, this, 
require);
 
+        // A serial consumer must not implicitly reduce a non-serial subtree 
to one pipeline
+        // task. Besides losing parallelism, that can make a remote Exchange 
expose fewer
+        // receiver tasks than FE addresses. Keep the subtree parallel and 
make the N-to-one
+        // transition explicit. PASS_TO_ONE keeps every upstream receiver task 
alive and
+        // funnels their output into the serial downstream pipeline's only 
task.
+        if (passToOneAtSerialBoundary && childOutput.second != 
LocalExchangeType.PASS_TO_ONE) {

Review Comment:
   Fixed in 6c7ead6a0d3. The generic PlanNode.enforceRequire path was already 
inserting PASS_TO_ONE for a serial analytic consumer over a parallel child, but 
the legacy no-PARTITION-BY cleanup in AnalyticEvalNode unwrapped every 
LocalExchangeNode. It now continues to remove redundant non-gather exchanges 
while retaining PASS_TO_ONE as the explicit N-to-one boundary. I also added a 
serial-source fragment unit case: it fails on the old code because the gather 
is removed, and passes after the fix. LocalShuffleNodeCoverageTest passed 
30/30; LocalExchangePlannerTest and NereidsCoordinatorTest passed 41/41; FE 
Checkstyle reports 0 violations.



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

Reply via email to