yiguolei commented on code in PR #40036:
URL: https://github.com/apache/doris/pull/40036#discussion_r1734156208


##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -692,15 +692,27 @@ Status PipelineFragmentContext::_add_local_exchange_impl(
     // 1. Create a new pipeline with local exchange sink.
     DataSinkOperatorXPtr sink;
     auto sink_id = next_sink_operator_id();
-    const bool is_shuffled_hash_join = operator_xs.size() > idx
-                                               ? 
operator_xs[idx]->is_shuffled_hash_join()
-                                               : 
cur_pipe->sink_x()->is_shuffled_hash_join();
+
+    /**
+     * `bucket_seq_to_instance_idx` is empty if no scan operator is contained 
in this fragment.
+     * So co-located operators(e.g. Agg, Analytic) should use `HASH_SHUFFLE` 
instead of `BUCKET_HASH_SHUFFLE`.
+     */
+    const bool should_disable_bucket_shuffle =
+            bucket_seq_to_instance_idx.empty() ||
+            (operator_xs.size() > idx ? 
operator_xs[idx]->is_shuffled_hash_join()
+                                      : 
cur_pipe->sink_x()->is_shuffled_hash_join());
     sink.reset(new LocalExchangeSinkOperatorX(

Review Comment:
   
   Agg(group a)  ---> join condition (t1.a = t2.a)
   
   scan t2 ----> build



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to