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 78a48df17b [Fix](Status) Handle status code correctly and add a new
error code `ENTRY_NOT_FOUND` (#24139)
78a48df17b is described below
commit 78a48df17bf264f3eb8f99bc29a4890380e1d62c
Author: bobhan1 <[email protected]>
AuthorDate: Mon Sep 11 09:32:11 2023 +0800
[Fix](Status) Handle status code correctly and add a new error code
`ENTRY_NOT_FOUND` (#24139)
---
be/src/common/status.h | 2 ++
be/src/olap/delete_bitmap_calculator.cpp | 2 +-
be/src/olap/rowset/segment_v2/binary_dict_page.cpp | 5 +++--
be/src/olap/rowset/segment_v2/binary_plain_page.h | 4 ++--
be/src/olap/rowset/segment_v2/binary_prefix_page.h | 6 +++---
be/src/olap/rowset/segment_v2/bitmap_index_reader.h | 2 +-
be/src/olap/rowset/segment_v2/bitshuffle_page.h | 8 ++++----
be/src/olap/rowset/segment_v2/frame_of_reference_page.h | 6 +++---
be/src/olap/rowset/segment_v2/index_page.cpp | 5 +++--
be/src/olap/rowset/segment_v2/index_page.h | 2 +-
be/src/olap/rowset/segment_v2/indexed_column_reader.cpp | 9 +++++----
be/src/olap/rowset/segment_v2/indexed_column_reader.h | 4 ++--
be/src/olap/rowset/segment_v2/page_builder.h | 4 ++--
be/src/olap/rowset/segment_v2/page_decoder.h | 2 +-
be/src/olap/rowset/segment_v2/plain_page.h | 8 ++++----
be/src/olap/rowset/segment_v2/rle_page.h | 4 ++--
be/src/olap/rowset/segment_v2/segment_iterator.cpp | 2 +-
be/src/olap/tablet.cpp | 2 +-
be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp | 4 ++--
be/test/olap/rowset/segment_v2/bitshuffle_page_test.cpp | 2 +-
be/test/olap/rowset/segment_v2/plain_page_test.cpp | 2 +-
21 files changed, 45 insertions(+), 40 deletions(-)
diff --git a/be/src/common/status.h b/be/src/common/status.h
index d74758ddf9..2b6b639b04 100644
--- a/be/src/common/status.h
+++ b/be/src/common/status.h
@@ -273,6 +273,7 @@ E(INVERTED_INDEX_EVALUATE_SKIPPED, -6007);
E(INVERTED_INDEX_BUILD_WAITTING, -6008);
E(KEY_NOT_FOUND, -6009);
E(KEY_ALREADY_EXISTS, -6010);
+E(ENTRY_NOT_FOUND, -6011);
#undef E
} // namespace ErrorCode
@@ -311,6 +312,7 @@ constexpr bool capture_stacktrace(int code) {
&& code != ErrorCode::TRANSACTION_ALREADY_VISIBLE
&& code != ErrorCode::TOO_MANY_TRANSACTIONS
&& code != ErrorCode::TRANSACTION_ALREADY_COMMITTED
+ && code != ErrorCode::ENTRY_NOT_FOUND
&& code != ErrorCode::KEY_NOT_FOUND
&& code != ErrorCode::KEY_ALREADY_EXISTS
&& code != ErrorCode::CANCELLED
diff --git a/be/src/olap/delete_bitmap_calculator.cpp
b/be/src/olap/delete_bitmap_calculator.cpp
index 46929a59c0..bfdb506c06 100644
--- a/be/src/olap/delete_bitmap_calculator.cpp
+++ b/be/src/olap/delete_bitmap_calculator.cpp
@@ -46,7 +46,7 @@ Status MergeIndexDeleteBitmapCalculatorContext::advance() {
Status MergeIndexDeleteBitmapCalculatorContext::seek_at_or_after(Slice const&
key) {
auto st = _iter->seek_at_or_after(&key, &_excat_match);
- if (st.is<ErrorCode::NOT_FOUND>()) {
+ if (st.is<ErrorCode::ENTRY_NOT_FOUND>()) {
return Status::EndOfFile("Reach the end of file");
}
RETURN_IF_ERROR(st);
diff --git a/be/src/olap/rowset/segment_v2/binary_dict_page.cpp
b/be/src/olap/rowset/segment_v2/binary_dict_page.cpp
index 94057fe5da..f075a5a208 100644
--- a/be/src/olap/rowset/segment_v2/binary_dict_page.cpp
+++ b/be/src/olap/rowset/segment_v2/binary_dict_page.cpp
@@ -26,6 +26,7 @@
// IWYU pragma: no_include <opentelemetry/common/threadlocal.h>
#include "common/compiler_util.h" // IWYU pragma: keep
#include "common/logging.h"
+#include "common/status.h"
#include "gutil/casts.h"
#include "gutil/port.h"
#include "gutil/strings/substitute.h" // for Substitute
@@ -179,7 +180,7 @@ Status
BinaryDictPageBuilder::get_dictionary_page(OwnedSlice* dictionary_page) {
Status BinaryDictPageBuilder::get_first_value(void* value) const {
DCHECK(_finished);
if (_data_page_builder->count() == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
if (_encoding_type != DICT_ENCODING) {
return _data_page_builder->get_first_value(value);
@@ -191,7 +192,7 @@ Status BinaryDictPageBuilder::get_first_value(void* value)
const {
Status BinaryDictPageBuilder::get_last_value(void* value) const {
DCHECK(_finished);
if (_data_page_builder->count() == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
if (_encoding_type != DICT_ENCODING) {
return _data_page_builder->get_last_value(value);
diff --git a/be/src/olap/rowset/segment_v2/binary_plain_page.h
b/be/src/olap/rowset/segment_v2/binary_plain_page.h
index f16039c099..1a48894c97 100644
--- a/be/src/olap/rowset/segment_v2/binary_plain_page.h
+++ b/be/src/olap/rowset/segment_v2/binary_plain_page.h
@@ -124,7 +124,7 @@ public:
Status get_first_value(void* value) const override {
DCHECK(_finished);
if (_offsets.size() == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
*reinterpret_cast<Slice*>(value) = Slice(_first_value);
return Status::OK();
@@ -132,7 +132,7 @@ public:
Status get_last_value(void* value) const override {
DCHECK(_finished);
if (_offsets.size() == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
*reinterpret_cast<Slice*>(value) = Slice(_last_value);
return Status::OK();
diff --git a/be/src/olap/rowset/segment_v2/binary_prefix_page.h
b/be/src/olap/rowset/segment_v2/binary_prefix_page.h
index b6ca02190f..26bdb1518d 100644
--- a/be/src/olap/rowset/segment_v2/binary_prefix_page.h
+++ b/be/src/olap/rowset/segment_v2/binary_prefix_page.h
@@ -72,7 +72,7 @@ public:
Status get_first_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
*reinterpret_cast<Slice*>(value) = Slice(_first_entry);
return Status::OK();
@@ -81,7 +81,7 @@ public:
Status get_last_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
*reinterpret_cast<Slice*>(value) = Slice(_last_entry);
return Status::OK();
@@ -137,7 +137,7 @@ private:
// read next value at `_cur_pos` and `_next_ptr` into `_current_value`.
// return OK and advance `_next_ptr` on success. `_cur_pos` is not
modified.
- // return NotFound when no more entry can be read.
+ // return EndOfFile when no more entry can be read.
// return other error status otherwise.
Status _read_next_value();
diff --git a/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
b/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
index 1ac1643989..6f1687354c 100644
--- a/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
+++ b/be/src/olap/rowset/segment_v2/bitmap_index_reader.h
@@ -86,7 +86,7 @@ public:
// by `current_ordinal()`, *exact_match is set to indicate whether the
// seeked value exactly matches `value` or not
//
- // Returns NotFound when no such value exists (all values in dictionary <
`value`).
+ // Returns Status::Error<ENTRY_NOT_FOUND> when no such value exists (all
values in dictionary < `value`).
// Returns other error status otherwise.
Status seek_dictionary(const void* value, bool* exact_match);
diff --git a/be/src/olap/rowset/segment_v2/bitshuffle_page.h
b/be/src/olap/rowset/segment_v2/bitshuffle_page.h
index 657a34e7c1..1d22b76b80 100644
--- a/be/src/olap/rowset/segment_v2/bitshuffle_page.h
+++ b/be/src/olap/rowset/segment_v2/bitshuffle_page.h
@@ -168,7 +168,7 @@ public:
Status get_first_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_first_value, SIZE_OF_TYPE);
return Status::OK();
@@ -176,7 +176,7 @@ public:
Status get_last_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_last_value, SIZE_OF_TYPE);
return Status::OK();
@@ -332,7 +332,7 @@ public:
DCHECK(_parsed) << "Must call init() firstly";
if (_num_elements == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
size_t left = 0;
@@ -353,7 +353,7 @@ public:
}
}
if (left >= _num_elements) {
- return Status::NotFound("all value small than the value");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small
than the value");
}
void* find_value = get_data(left);
if (TypeTraits<Type>::cmp(find_value, value) == 0) {
diff --git a/be/src/olap/rowset/segment_v2/frame_of_reference_page.h
b/be/src/olap/rowset/segment_v2/frame_of_reference_page.h
index ad1e0bc541..64e57afa98 100644
--- a/be/src/olap/rowset/segment_v2/frame_of_reference_page.h
+++ b/be/src/olap/rowset/segment_v2/frame_of_reference_page.h
@@ -70,7 +70,7 @@ public:
Status get_first_value(void* value) const override {
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_first_val, sizeof(CppType));
return Status::OK();
@@ -78,7 +78,7 @@ public:
Status get_last_value(void* value) const override {
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_last_val, sizeof(CppType));
return Status::OK();
@@ -135,7 +135,7 @@ public:
DCHECK(_parsed) << "Must call init() firstly";
bool found = _decoder->seek_at_or_after_value(value, exact_match);
if (!found) {
- return Status::NotFound("not found");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("not found");
}
_cur_index = _decoder->current_index();
return Status::OK();
diff --git a/be/src/olap/rowset/segment_v2/index_page.cpp
b/be/src/olap/rowset/segment_v2/index_page.cpp
index 3b8bc03977..9af7047c49 100644
--- a/be/src/olap/rowset/segment_v2/index_page.cpp
+++ b/be/src/olap/rowset/segment_v2/index_page.cpp
@@ -52,7 +52,7 @@ void IndexPageBuilder::finish(OwnedSlice* body, PageFooterPB*
footer) {
Status IndexPageBuilder::get_first_key(Slice* key) const {
if (_count == 0) {
- return Status::NotFound("index page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("index page is
empty");
}
Slice input(_buffer);
if (get_length_prefixed_slice(&input, key)) {
@@ -105,7 +105,8 @@ Status IndexPageIterator::seek_at_or_before(const Slice&
search_key) {
// no exact match, the insertion point is `left`
if (left == 0) {
// search key is smaller than all keys
- return Status::NotFound("given key is smaller than all keys in page");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>(
+ "given key is smaller than all keys in page");
}
// index entry records the first key of the indexed page,
// therefore the first page with keys >= searched key is the one before
the insertion point
diff --git a/be/src/olap/rowset/segment_v2/index_page.h
b/be/src/olap/rowset/segment_v2/index_page.h
index 106fc0ffc5..c889d0fb16 100644
--- a/be/src/olap/rowset/segment_v2/index_page.h
+++ b/be/src/olap/rowset/segment_v2/index_page.h
@@ -123,7 +123,7 @@ public:
// Find the largest index entry whose key is <= search_key.
// Return OK status when such entry exists.
- // Return NotFound when no such entry is found (all keys > search_key).
+ // Return ENTRY_NOT_FOUND when no such entry is found (all keys >
search_key).
// Return other error status otherwise.
Status seek_at_or_before(const Slice& search_key);
diff --git a/be/src/olap/rowset/segment_v2/indexed_column_reader.cpp
b/be/src/olap/rowset/segment_v2/indexed_column_reader.cpp
index d5a84a4c9c..9cc79cb543 100644
--- a/be/src/olap/rowset/segment_v2/indexed_column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/indexed_column_reader.cpp
@@ -21,6 +21,7 @@
#include <algorithm>
+#include "common/status.h"
#include "gutil/strings/substitute.h" // for Substitute
#include "olap/key_coder.h"
#include "olap/olap_common.h"
@@ -200,7 +201,7 @@ Status IndexedColumnIterator::seek_at_or_after(const void*
key, bool* exact_matc
}
if (_reader->num_values() == 0) {
- return Status::NotFound("value index is empty ");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("value index is empty
");
}
g_index_reader_seek_count << 1;
@@ -212,11 +213,11 @@ Status IndexedColumnIterator::seek_at_or_after(const
void* key, bool* exact_matc
std::string encoded_key;
_reader->_value_key_coder->full_encode_ascending(key, &encoded_key);
Status st = _value_iter.seek_at_or_before(encoded_key);
- if (st.is<NOT_FOUND>()) {
+ if (st.is<ENTRY_NOT_FOUND>()) {
// all keys in page is greater than `encoded_key`, point to the
first page.
// otherwise, we may missing some pages.
// For example, the predicate is `col1 > 2`, and the index page is
[3,5,7].
- // so the `seek_at_or_before(2)` will return Status::NotFound().
+ // so the `seek_at_or_before(2)` will return
Status::Error<ENTRY_NOT_FOUND>().
// But actually, we expect it to point to page `3`.
_value_iter.seek_to_first();
} else if (!st.ok()) {
@@ -241,7 +242,7 @@ Status IndexedColumnIterator::seek_at_or_after(const void*
key, bool* exact_matc
// seek inside data page
Status st = _data_page.data_decoder->seek_at_or_after_value(key,
exact_match);
// return the first row of next page when not found
- if (st.is<NOT_FOUND>() && _reader->_has_index_page) {
+ if (st.is<ENTRY_NOT_FOUND>() && _reader->_has_index_page) {
if (_value_iter.has_next()) {
_seeked = true;
*exact_match = false;
diff --git a/be/src/olap/rowset/segment_v2/indexed_column_reader.h
b/be/src/olap/rowset/segment_v2/indexed_column_reader.h
index b49dc0f18b..6399176e15 100644
--- a/be/src/olap/rowset/segment_v2/indexed_column_reader.h
+++ b/be/src/olap/rowset/segment_v2/indexed_column_reader.h
@@ -103,7 +103,7 @@ public:
_value_iter(&reader->_value_index_reader) {}
// Seek to the given ordinal entry. Entry 0 is the first entry.
- // Return NotFound if provided seek point is past the end.
+ // Return Status::Error<ENTRY_NOT_FOUND> if provided seek point is past
the end.
// Return NotSupported for column without ordinal index.
Status seek_to_ordinal(ordinal_t idx);
@@ -114,7 +114,7 @@ public:
// Sets *exact_match to indicate whether the seek found the exact
// key requested.
//
- // Return NotFound if the given key is greater than all keys in this
column.
+ // Return Status::Error<ENTRY_NOT_FOUND> if the given key is greater than
all keys in this column.
// Return NotSupported for column without value index.
Status seek_at_or_after(const void* key, bool* exact_match);
Status seek_at_or_after(const std::string* key, bool* exact_match) {
diff --git a/be/src/olap/rowset/segment_v2/page_builder.h
b/be/src/olap/rowset/segment_v2/page_builder.h
index ab74ad7fca..5df2ce949b 100644
--- a/be/src/olap/rowset/segment_v2/page_builder.h
+++ b/be/src/olap/rowset/segment_v2/page_builder.h
@@ -79,12 +79,12 @@ public:
// Return the first value in this page.
// This method could only be called between finish() and reset().
- // Status::NotFound if no values have been added.
+ // Status::Error<ENTRY_NOT_FOUND> if no values have been added.
virtual Status get_first_value(void* value) const = 0;
// Return the last value in this page.
// This method could only be called between finish() and reset().
- // Status::NotFound if no values have been added.
+ // Status::Error<ENTRY_NOT_FOUND> if no values have been added.
virtual Status get_last_value(void* value) const = 0;
private:
diff --git a/be/src/olap/rowset/segment_v2/page_decoder.h
b/be/src/olap/rowset/segment_v2/page_decoder.h
index e1aef24e4e..c059ac4b83 100644
--- a/be/src/olap/rowset/segment_v2/page_decoder.h
+++ b/be/src/olap/rowset/segment_v2/page_decoder.h
@@ -52,7 +52,7 @@ public:
//
// If the given value is less than the lowest value in the page,
// seeks to the start of the page. If it is higher than the highest
- // value in the page, then returns Status::NotFound
+ // value in the page, then returns Status::Error<ENTRY_NOT_FOUND>
//
// This will only return valid results when the data page
// consists of values in sorted order.
diff --git a/be/src/olap/rowset/segment_v2/plain_page.h
b/be/src/olap/rowset/segment_v2/plain_page.h
index bd2e974709..ca2029245a 100644
--- a/be/src/olap/rowset/segment_v2/plain_page.h
+++ b/be/src/olap/rowset/segment_v2/plain_page.h
@@ -77,7 +77,7 @@ public:
Status get_first_value(void* value) const override {
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, _first_value.data(), SIZE_OF_TYPE);
return Status::OK();
@@ -85,7 +85,7 @@ public:
Status get_last_value(void* value) const override {
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, _last_value.data(), SIZE_OF_TYPE);
return Status::OK();
@@ -147,7 +147,7 @@ public:
DCHECK(_parsed) << "Must call init() firstly";
if (_num_elems == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
size_t left = 0;
@@ -168,7 +168,7 @@ public:
}
}
if (left >= _num_elems) {
- return Status::NotFound("all value small than the value");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small
than the value");
}
const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left *
SIZE_OF_TYPE];
if (TypeTraits<Type>::cmp(find_value, value) == 0) {
diff --git a/be/src/olap/rowset/segment_v2/rle_page.h
b/be/src/olap/rowset/segment_v2/rle_page.h
index bae694dbfc..7f98b6e76f 100644
--- a/be/src/olap/rowset/segment_v2/rle_page.h
+++ b/be/src/olap/rowset/segment_v2/rle_page.h
@@ -116,7 +116,7 @@ public:
Status get_first_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_first_value, SIZE_OF_TYPE);
return Status::OK();
@@ -125,7 +125,7 @@ public:
Status get_last_value(void* value) const override {
DCHECK(_finished);
if (_count == 0) {
- return Status::NotFound("page is empty");
+ return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
}
memcpy(value, &_last_value, SIZE_OF_TYPE);
return Status::OK();
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index c82ad31b24..605eeb793b 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -1201,7 +1201,7 @@ Status
SegmentIterator::_lookup_ordinal_from_pk_index(const RowCursor& key, bool
Status status = index_iterator->seek_at_or_after(&index_key, &exact_match);
if (UNLIKELY(!status.ok())) {
*rowid = num_rows();
- if (status.is<NOT_FOUND>()) {
+ if (status.is<ENTRY_NOT_FOUND>()) {
return Status::OK();
}
return status;
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index c732b200f7..71da59808e 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -2832,7 +2832,7 @@ Status Tablet::lookup_row_key(const Slice& encoded_key,
bool with_seq_col,
for (auto id : picked_segments) {
Status s = segments[id]->lookup_row_key(encoded_key, with_seq_col,
&loc);
- if (s.is<KEY_NOT_FOUND>()) {
+ if (s.is<ENTRY_NOT_FOUND>() || s.is<KEY_NOT_FOUND>()) {
continue;
}
if (!s.ok() && !s.is<KEY_ALREADY_EXISTS>()) {
diff --git a/be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp
b/be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp
index 07329f18fe..e6aefd49e1 100644
--- a/be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp
+++ b/be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp
@@ -132,7 +132,7 @@ public:
Slice v1 = Slice("1039");
bool exact_match;
ret = page_decoder->seek_at_or_after_value(&v1, &exact_match);
- EXPECT_TRUE(ret.is<NOT_FOUND>());
+ EXPECT_TRUE(ret.is<ENTRY_NOT_FOUND>());
Slice v2 = Slice("1000");
ret = page_decoder->seek_at_or_after_value(&v2, &exact_match);
@@ -243,7 +243,7 @@ public:
Slice v1 = Slice("1039");
bool exact_match;
ret = page_decoder->seek_at_or_after_value(&v1, &exact_match);
- EXPECT_TRUE(ret.is<NOT_FOUND>());
+ EXPECT_TRUE(ret.is<ENTRY_NOT_FOUND>());
Slice v2 = Slice("1000");
ret = page_decoder->seek_at_or_after_value(&v2, &exact_match);
diff --git a/be/test/olap/rowset/segment_v2/bitshuffle_page_test.cpp
b/be/test/olap/rowset/segment_v2/bitshuffle_page_test.cpp
index bf4623c26b..75d09363ee 100644
--- a/be/test/olap/rowset/segment_v2/bitshuffle_page_test.cpp
+++ b/be/test/olap/rowset/segment_v2/bitshuffle_page_test.cpp
@@ -165,7 +165,7 @@ public:
EXPECT_FALSE(exact_match);
status = page_decoder.seek_at_or_after_value(bigger_than_biggest,
&exact_match);
- EXPECT_EQ(status.code(), NOT_FOUND);
+ EXPECT_EQ(status.code(), ENTRY_NOT_FOUND);
}
};
diff --git a/be/test/olap/rowset/segment_v2/plain_page_test.cpp
b/be/test/olap/rowset/segment_v2/plain_page_test.cpp
index 22e2e7b03b..bd18215522 100644
--- a/be/test/olap/rowset/segment_v2/plain_page_test.cpp
+++ b/be/test/olap/rowset/segment_v2/plain_page_test.cpp
@@ -160,7 +160,7 @@ public:
if (bigger_than_biggest != nullptr) {
status = page_decoder.seek_at_or_after_value(bigger_than_biggest,
&exact_match);
- EXPECT_EQ(status.code(), NOT_FOUND);
+ EXPECT_EQ(status.code(), ENTRY_NOT_FOUND);
}
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]