This is an automated email from the ASF dual-hosted git repository.
eldenmoon 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 445d42a57dd [fix](topn-opt) remove redundant check for fetch phase
(#36676)
445d42a57dd is described below
commit 445d42a57dd9e59ab5e95391c308fc463ccf2d7c
Author: lihangyu <[email protected]>
AuthorDate: Fri Jun 21 22:28:38 2024 +0800
[fix](topn-opt) remove redundant check for fetch phase (#36676)
#36629
Issue Number: close #xxx
<!--Describe your changes.-->
---
be/src/exec/rowid_fetcher.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/be/src/exec/rowid_fetcher.cpp b/be/src/exec/rowid_fetcher.cpp
index 6a7e21d81cc..c9aa200e1d6 100644
--- a/be/src/exec/rowid_fetcher.cpp
+++ b/be/src/exec/rowid_fetcher.cpp
@@ -231,10 +231,6 @@ 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() != res_block->rows() || 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) {
@@ -255,12 +251,12 @@ Status RowIDFetcher::fetch(const vectorized::ColumnPtr&
column_row_ids,
reinterpret_cast<const
GlobalRowLoacation*>(column_row_ids->get_data_at(i).data);
permutation.push_back(positions[*location]);
}
- // Check row consistency
- RETURN_IF_CATCH_EXCEPTION(res_block->check_number_of_rows());
for (size_t i = 0; i < res_block->columns(); ++i) {
res_block->get_by_position(i).column =
res_block->get_by_position(i).column->permute(permutation,
permutation.size());
}
+ // Check row consistency
+ RETURN_IF_CATCH_EXCEPTION(res_block->check_number_of_rows());
// shrink for char type
std::vector<size_t> char_type_idx;
for (size_t i = 0; i < _fetch_option.desc->slots().size(); i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]