From 445d42a57dd9e59ab5e95391c308fc463ccf2d7c Mon Sep 17 00:00:00 2001 From: lihangyu <15605149486@163.com> Date: Fri, 21 Jun 2024 22:28:38 +0800 Subject: [PATCH] [fix](topn-opt) remove redundant check for fetch phase (#36676) #36629 Issue Number: close #xxx --- 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 6a7e21d81c..c9aa200e1d 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 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 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(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 char_type_idx; for (size_t i = 0; i < _fetch_option.desc->slots().size(); i++) {