This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8318dfa9a3 [fix](datastream sender) fix wrong result of
BUCKET_SHFFULE_HASH_PARTITIONED shuffle (#22973)
8318dfa9a3 is described below
commit 8318dfa9a393a787a89b39808a4d94508067129b
Author: TengJianPing <[email protected]>
AuthorDate: Tue Aug 15 10:21:14 2023 +0800
[fix](datastream sender) fix wrong result of
BUCKET_SHFFULE_HASH_PARTITIONED shuffle (#22973)
fix wrong result of BUCKET_SHFFULE_HASH_PARTITIONED shuffle
---
be/src/vec/sink/vdata_stream_sender.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/sink/vdata_stream_sender.cpp
b/be/src/vec/sink/vdata_stream_sender.cpp
index 1f0e0059e4..244714d3e7 100644
--- a/be/src/vec/sink/vdata_stream_sender.cpp
+++ b/be/src/vec/sink/vdata_stream_sender.cpp
@@ -596,7 +596,9 @@ Status VDataStreamSender::send(RuntimeState* state, Block*
block, bool eos) {
// vectorized calculate hash
int rows = block->rows();
- auto element_size = _channels.size();
+ auto element_size = _part_type == TPartitionType::HASH_PARTITIONED
+ ? _channels.size()
+ : _channel_shared_ptrs.size();
std::vector<uint64_t> hash_vals(rows);
auto* __restrict hashes = hash_vals.data();
@@ -630,7 +632,6 @@ Status VDataStreamSender::send(RuntimeState* state, Block*
block, bool eos) {
.first->update_crcs_with_value(
hash_vals,
_partition_expr_ctxs[j]->root()->type().type);
}
- element_size = _channel_shared_ptrs.size();
for (int i = 0; i < rows; i++) {
hashes[i] = hashes[i] % element_size;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]