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

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

commit c97772e5a9fe09e9c60e6393681e836a340c95c3
Author: Gabriel <[email protected]>
AuthorDate: Tue Aug 27 08:47:49 2024 +0800

    [fix](followup) Fix wrong partition num (#39916)
    
    Follow-up for #39568
---
 .../pipeline/local_exchange/local_exchange_sink_operator.cpp   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/be/src/pipeline/local_exchange/local_exchange_sink_operator.cpp 
b/be/src/pipeline/local_exchange/local_exchange_sink_operator.cpp
index 91a2c630418..f0a51696075 100644
--- a/be/src/pipeline/local_exchange/local_exchange_sink_operator.cpp
+++ b/be/src/pipeline/local_exchange/local_exchange_sink_operator.cpp
@@ -57,12 +57,10 @@ Status LocalExchangeSinkOperatorX::init(ExchangeType type, 
const int num_buckets
                 _shuffle_idx_to_instance_idx[i] = {i, i};
             }
         }
-        _partitioner.reset(
-                _type == ExchangeType::HASH_SHUFFLE
-                        ? new 
vectorized::Crc32HashPartitioner<vectorized::ShuffleChannelIds>(
-                                  _num_partitions)
-                        : new 
vectorized::Crc32HashPartitioner<vectorized::ShuffleChannelIds>(
-                                  num_buckets));
+        _partitioner.reset(new 
vectorized::Crc32HashPartitioner<vectorized::ShuffleChannelIds>(
+                _type == ExchangeType::HASH_SHUFFLE || 
_bucket_seq_to_instance_idx.empty()
+                        ? _num_partitions
+                        : num_buckets));
         RETURN_IF_ERROR(_partitioner->init(_texprs));
     }
     return Status::OK();


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

Reply via email to