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


##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -1073,8 +1084,8 @@ Status PipelineFragmentContext::_add_local_exchange_impl(
                         : 0);
         break;
     case TLocalPartitionType::PASS_TO_ONE:
-        if (_runtime_state->enable_share_hash_table_for_broadcast_join()) {
-            // If shared hash table is enabled for BJ, hash table will be 
built by only one task
+        if (_runtime_state->be_exec_version() >= 
SUPPORT_UNCONDITIONAL_PASS_TO_ONE_VERSION ||

Review Comment:
   [P1] Preserve private broadcast builds in the BE-native planner. This v14 
branch also runs when FE local-shuffle planning is disabled. The native 
hash-join build sink still requests `PASS_TO_ONE` for a serial broadcast child 
even with sharing disabled, so every probe task owns a private hash table, but 
`PassToOneExchanger` sends build rows only to task 0. Tasks 1..N-1 then probe 
empty tables and can return wrong rows. This is distinct from the prior 
mixed-version thread: it is a same-version v14 native-planner path. Keep the 
share-disabled native case as `BROADCAST` (or change its requirement), and add 
a native-planner result test.



##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -1100,6 +1103,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] Gate this generic boundary on BE task-cardinality support. For 
execution version 13, FE still emits `PASS_TO_ONE` and only forces the legacy 
shared-build option. An old BE then selects `PassToOneExchanger` but resets the 
local-exchange source / scalar-aggregate sink pipeline and its source 
dependencies to `_num_instances`, while the serial aggregate source remains one 
task; only channel 0 receives rows. This is the residual issue after the prior 
mixed-version fix: compatible exchanger selection cannot add the one-task 
pipeline construction missing from the old binary. Use a v13-compatible 
plan/destination strategy and test the old-BE construction, not only query 
options.



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