Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions be/src/olap/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,6 @@ Status TabletReader::_init_keys_param(const ReaderParams& read_params) {
}

Status TabletReader::_init_orderby_keys_param(const ReaderParams& read_params) {
if (read_params.start_key.empty()) {
return Status::OK();
}

// UNIQUE_KEYS will compare all keys as before
if (_tablet_schema->keys_type() == DUP_KEYS || (_tablet_schema->keys_type() == UNIQUE_KEYS &&
_tablet->enable_unique_key_merge_on_write())) {
Expand Down
5 changes: 5 additions & 0 deletions be/src/vec/olap/vcollect_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ Status VCollectIterator::_topn_next(Block* block) {
auto cloneBlock = block->clone_empty();
MutableBlock mutable_block = vectorized::MutableBlock::build_mutable_block(&cloneBlock);

if (!_reader->_reader_context.read_orderby_key_columns) {
return Status::Error<ErrorCode::INTERNAL_ERROR>(
"read_orderby_key_columns should not be nullptr");
}

size_t first_sort_column_idx = (*_reader->_reader_context.read_orderby_key_columns)[0];
const std::vector<uint32_t>* sort_columns = _reader->_reader_context.read_orderby_key_columns;

Expand Down