Skip to content

Commit

Permalink
[Fix](topn) avoid missmatched row count when upgrading (apache#41000)
Browse files Browse the repository at this point in the history
  • Loading branch information
eldenmoon authored Sep 23, 2024
1 parent cbe5f7e commit 8140401
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions be/src/exec/rowid_fetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,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) {
Expand Down

0 comments on commit 8140401

Please sign in to comment.