This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0726a43  [fix](be-ut) Fix unused-but-set-variable errors. (#8211)
0726a43 is described below

commit 0726a43a2ae083804644a07ef8c81f029e3e46e1
Author: Adonis Ling <adonis0...@gmail.com>
AuthorDate: Wed Feb 23 21:43:15 2022 +0800

    [fix](be-ut) Fix unused-but-set-variable errors. (#8211)
---
 be/test/exec/es_predicate_test.cpp                        | 1 +
 be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp  | 2 ++
 be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp | 1 +
 be/test/tools/benchmark_tool.cpp                          | 5 +++--
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/be/test/exec/es_predicate_test.cpp 
b/be/test/exec/es_predicate_test.cpp
index 4f8c76c..1e382ba 100644
--- a/be/test/exec/es_predicate_test.cpp
+++ b/be/test/exec/es_predicate_test.cpp
@@ -142,6 +142,7 @@ Status 
EsPredicateTest::build_expr_context_list(std::vector<ExprContext*>& conju
 TEST_F(EsPredicateTest, normal) {
     std::vector<ExprContext*> conjunct_ctxs;
     Status status = build_expr_context_list(conjunct_ctxs);
+    ASSERT_TRUE(status.ok());
 
     TupleDescriptor* tuple_desc = _desc_tbl->get_tuple_descriptor(0);
     std::vector<EsPredicate*> predicates;
diff --git a/be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp 
b/be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp
index de48637..ebaa19b 100644
--- a/be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp
+++ b/be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp
@@ -48,6 +48,7 @@ public:
 
         const Slice* ptr = &slices[0];
         Status ret = page_builder.add(reinterpret_cast<const uint8_t*>(ptr), 
&count);
+        ASSERT_TRUE(ret.ok());
 
         OwnedSlice s = page_builder.finish();
         ASSERT_EQ(slices.size(), page_builder.count());
@@ -135,6 +136,7 @@ public:
             size_t add_num = 1;
             const Slice* ptr = &contents[i];
             Status ret = page_builder.add(reinterpret_cast<const 
uint8_t*>(ptr), &add_num);
+            ASSERT_TRUE(ret.ok());
             if (page_builder.is_page_full()) {
                 OwnedSlice s = page_builder.finish();
                 total_size += s.slice().size;
diff --git a/be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp 
b/be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp
index 5efb362..781fce4 100644
--- a/be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp
+++ b/be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp
@@ -53,6 +53,7 @@ public:
 
         Slice* ptr = &slices[0];
         Status ret = page_builder.add(reinterpret_cast<const uint8_t*>(ptr), 
&count);
+        ASSERT_TRUE(ret.ok());
 
         OwnedSlice owned_slice = page_builder.finish();
 
diff --git a/be/test/tools/benchmark_tool.cpp b/be/test/tools/benchmark_tool.cpp
index e06cc3d..74f6cc0 100644
--- a/be/test/tools/benchmark_tool.cpp
+++ b/be/test/tools/benchmark_tool.cpp
@@ -152,7 +152,7 @@ public:
         for (size_t i = 0; i < contents.size(); i++) {
             const Slice* ptr = &contents[i];
             size_t add_num = 1;
-            Status ret = page_builder.add(reinterpret_cast<const 
uint8_t*>(ptr), &add_num);
+            page_builder.add(reinterpret_cast<const uint8_t*>(ptr), &add_num);
             if (page_builder.is_page_full()) {
                 OwnedSlice s = page_builder.finish();
                 results.emplace_back(std::move(s));
@@ -164,8 +164,9 @@ public:
         results.emplace_back(std::move(s));
         page_start_ids.push_back(contents.size());
 
-        Status status = page_builder.get_dictionary_page(&dict_slice);
+        page_builder.get_dictionary_page(&dict_slice);
     }
+
     void decode_pages() {
         int slice_index = 0;
         for (auto& src : results) {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to