This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 920b5d13a9a [fix](topn-opt) remove redundant check for fetch phase
(#36631)
920b5d13a9a is described below
commit 920b5d13a9a3425398defce73d374e69887e1911
Author: lihangyu <[email protected]>
AuthorDate: Thu Jun 20 23:08:23 2024 +0800
[fix](topn-opt) remove redundant check for fetch phase (#36631)
---
be/src/exec/rowid_fetcher.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/be/src/exec/rowid_fetcher.cpp b/be/src/exec/rowid_fetcher.cpp
index b986830888e..c5f775846fb 100644
--- a/be/src/exec/rowid_fetcher.cpp
+++ b/be/src/exec/rowid_fetcher.cpp
@@ -230,10 +230,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) {
@@ -250,11 +246,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]);
}
- size_t num_rows = res_block->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,
num_rows);
+ 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]