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 1c630eb6630 branch-4.0: [Bug](exec) Return error is
materialization_opertor not found right backend id #58470 (#59358)
1c630eb6630 is described below
commit 1c630eb6630875e8e87922e20f4ce07f7eb4598d
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Dec 26 12:28:10 2025 +0800
branch-4.0: [Bug](exec) Return error is materialization_opertor not found
right backend id #58470 (#59358)
Cherry-picked from #58470
Co-authored-by: HappenLee <[email protected]>
---
be/src/pipeline/exec/materialization_opertor.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/be/src/pipeline/exec/materialization_opertor.cpp
b/be/src/pipeline/exec/materialization_opertor.cpp
index 689d345dd0a..51f07d65002 100644
--- a/be/src/pipeline/exec/materialization_opertor.cpp
+++ b/be/src/pipeline/exec/materialization_opertor.cpp
@@ -55,7 +55,7 @@ void MaterializationSharedState::get_block(vectorized::Block*
block) {
}
Status MaterializationSharedState::merge_multi_response() {
- std::map<int64_t, std::pair<vectorized::Block, int>> _block_maps;
+ std::unordered_map<int64_t, std::pair<vectorized::Block, int>> block_maps;
for (int i = 0; i < block_order_results.size(); ++i) {
for (auto& [backend_id, rpc_struct] : rpc_struct_map) {
vectorized::Block partial_block;
@@ -71,14 +71,20 @@ Status MaterializationSharedState::merge_multi_response() {
}
if (!partial_block.is_empty_column()) {
- _block_maps[backend_id] =
std::make_pair(std::move(partial_block), 0);
+ block_maps[backend_id] =
std::make_pair(std::move(partial_block), 0);
}
}
for (int j = 0; j < block_order_results[i].size(); ++j) {
auto backend_id = block_order_results[i][j];
if (backend_id) {
- auto& source_block_rows = _block_maps[backend_id];
+ if (UNLIKELY(block_maps.find(backend_id) == block_maps.end()))
{
+ return Status::InternalError(
+
fmt::format("MaterializationSharedState::merge_multi_response, "
+ "backend_id {} not found in
block_maps",
+ backend_id));
+ }
+ auto& source_block_rows = block_maps[backend_id];
DCHECK(source_block_rows.second <
source_block_rows.first.rows());
for (int k = 0; k < response_blocks[i].columns(); ++k) {
response_blocks[i].get_column_by_position(k)->insert_from(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]