github-actions[bot] commented on code in PR #67177:
URL: https://github.com/apache/doris/pull/67177#discussion_r3957298225


##########
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:
   [P1] Preserve this gather for unpartitioned analytic consumers
   
   For a serial-source fragment, a reachable reduced tree is:
   
   ```text
   AnalyticEval(OVER(), serial)
     HashJoin(parallel)
       ...
       Exchange / inner local exchange
   ```
   
   This block correctly wraps the non-serial child in `PASS_TO_ONE`, but 
`AnalyticEvalNode.enforceAndDeriveLocalExchange()` immediately unwraps every 
returned `LocalExchangeNode` at lines 222-223. Because the new boundary logic 
clears the serial markers while planning the child, inner exchanges can remain; 
after the outer gather is removed, BE propagation can raise the analytic-sink 
pipeline to N tasks while its paired serial analytic-source pipeline stays at 
one task, recreating the shared-state/EOS mismatch this boundary is meant to 
prevent. The changed no-partition unit fixture is fragment-less, so 
`isSerialOperatorOnBe()` is false and it never exercises this case. Please 
retain `PASS_TO_ONE` in the analytic special case and add a serial-source 
analytic-over-parallel-subtree regression.



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