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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new c6a6adb3a41 [Fix](topn) avoid missmatched row count when upgrading 
(#40999)
c6a6adb3a41 is described below

commit c6a6adb3a4179be00232c8e41adeb93f483709e5
Author: lihangyu <[email protected]>
AuthorDate: Sat Sep 21 08:46:57 2024 +0800

    [Fix](topn) avoid missmatched row count when upgrading (#40999)
    
    #41000
---
 be/src/exec/rowid_fetcher.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/src/exec/rowid_fetcher.cpp b/be/src/exec/rowid_fetcher.cpp
index b51e263d86b..89b5a0ebcb6 100644
--- a/be/src/exec/rowid_fetcher.cpp
+++ b/be/src/exec/rowid_fetcher.cpp
@@ -232,6 +232,10 @@ Status RowIDFetcher::fetch(const vectorized::ColumnPtr& 
column_row_ids,
     std::vector<PRowLocation> rows_locs;
     rows_locs.reserve(rows_locs.size());
     RETURN_IF_ERROR(_merge_rpc_results(mget_req, resps, cntls, res_block, 
&rows_locs));
+    if (rows_locs.size() < column_row_ids->size()) {
+        return Status::InternalError("Miss matched return row loc count {}, 
expected {}, input {}",
+                                     rows_locs.size(), res_block->rows(), 
column_row_ids->size());
+    }
     // Final sort by row_ids sequence, since row_ids is already sorted if need
     std::map<GlobalRowLoacation, size_t> positions;
     for (size_t i = 0; i < rows_locs.size(); ++i) {


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

Reply via email to