This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new b38e48bc19f [fix](local shuffle) Fix local shuffle strategy (#61144)
b38e48bc19f is described below

commit b38e48bc19f16a2e033d0116f5a3dda31a89eb32
Author: Gabriel <[email protected]>
AuthorDate: Tue Mar 10 11:52:53 2026 +0800

    [fix](local shuffle) Fix local shuffle strategy (#61144)
    
    ### What problem does this PR solve?
    pick #61057
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test <!-- At least one of them must be included. -->
        - [ ] Regression test
        - [ ] Unit Test
        - [ ] Manual test (add detailed scripts or steps below)
        - [ ] No need to test or manual test. Explain why:
    - [ ] This is a refactor/code format and no logic has been changed.
            - [ ] Previous test can cover this change.
            - [ ] No code files have been changed.
            - [ ] Other reason <!-- Add your reason?  -->
    
    - Behavior changed:
        - [ ] No.
        - [ ] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [ ] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [ ] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 be/src/pipeline/pipeline_fragment_context.cpp | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/be/src/pipeline/pipeline_fragment_context.cpp 
b/be/src/pipeline/pipeline_fragment_context.cpp
index 78e961d0111..13e5d0c0eb4 100644
--- a/be/src/pipeline/pipeline_fragment_context.cpp
+++ b/be/src/pipeline/pipeline_fragment_context.cpp
@@ -695,16 +695,20 @@ Status PipelineFragmentContext::_create_tree_helper(
                     ? 
cur_pipe->sink()->required_data_distribution(_runtime_state.get())
                     : op->required_data_distribution(_runtime_state.get());
     current_followed_by_shuffled_operator =
-            (followed_by_shuffled_operator ||
-             (cur_pipe->operators().empty() ? 
cur_pipe->sink()->is_shuffled_operator()
-                                            : op->is_shuffled_operator())) &&
-            
Pipeline::is_hash_exchange(required_data_distribution.distribution_type);
+            ((followed_by_shuffled_operator ||
+              (cur_pipe->operators().empty() ? 
cur_pipe->sink()->is_shuffled_operator()
+                                             : op->is_shuffled_operator())) &&
+             
Pipeline::is_hash_exchange(required_data_distribution.distribution_type)) ||
+            (followed_by_shuffled_operator &&
+             required_data_distribution.distribution_type == 
ExchangeType::NOOP);
 
     current_require_bucket_distribution =
-            (require_bucket_distribution ||
-             (cur_pipe->operators().empty() ? 
cur_pipe->sink()->is_colocated_operator()
-                                            : op->is_colocated_operator())) &&
-            
Pipeline::is_hash_exchange(required_data_distribution.distribution_type);
+            ((require_bucket_distribution ||
+              (cur_pipe->operators().empty() ? 
cur_pipe->sink()->is_colocated_operator()
+                                             : op->is_colocated_operator())) &&
+             
Pipeline::is_hash_exchange(required_data_distribution.distribution_type)) ||
+            (require_bucket_distribution &&
+             required_data_distribution.distribution_type == 
ExchangeType::NOOP);
 
     if (num_children == 0) {
         _use_serial_source = op->is_serial_operator();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to