Skip to content
Merged
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
8 changes: 4 additions & 4 deletions be/src/olap/rowset/segment_v2/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_sche

DCHECK(_pk_index_reader != nullptr);
if (!_pk_index_reader->check_present(key_without_seq)) {
return Status::Error<ErrorCode::KEY_NOT_FOUND>("Can't find key in the segment");
return Status::Error<ErrorCode::KEY_NOT_FOUND, false>("");
}
bool exact_match = false;
std::unique_ptr<segment_v2::IndexedColumnIterator> index_iterator;
Expand All @@ -844,7 +844,7 @@ Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_sche
return st;
}
if (st.is<ErrorCode::ENTRY_NOT_FOUND>() || (!has_seq_col && !has_rowid && !exact_match)) {
return Status::Error<ErrorCode::KEY_NOT_FOUND>("Can't find key in the segment");
return Status::Error<ErrorCode::KEY_NOT_FOUND, false>("");
}
row_location->row_id = cast_set<uint32_t>(index_iterator->get_current_ordinal());
row_location->segment_id = _segment_id;
Expand All @@ -871,7 +871,7 @@ Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_sche
if (has_seq_col) {
// compare key
if (key_without_seq.compare(sought_key_without_seq) != 0) {
return Status::Error<ErrorCode::KEY_NOT_FOUND>("Can't find key in the segment");
return Status::Error<ErrorCode::KEY_NOT_FOUND, false>("");
}

if (with_seq_col && segment_has_seq_col) {
Expand All @@ -891,7 +891,7 @@ Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_sche
Slice(sought_key.get_data(), sought_key.get_size() - rowid_length);
// compare key
if (key_without_seq.compare(sought_key_without_rowid) != 0) {
return Status::Error<ErrorCode::KEY_NOT_FOUND>("Can't find key in the segment");
return Status::Error<ErrorCode::KEY_NOT_FOUND, false>("");
}
}
// found the key, use rowid in pk index if necessary.
Expand Down
Loading