You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/04/08 02:26:43 UTC

[incubator-doris] branch master updated: fix bitmap unit test failed (#5610)

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

yangzhg 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 40f53ac  fix bitmap unit test failed (#5610)
40f53ac is described below

commit 40f53ac71fa4acc66b9c3c4b5024089d0dd00c44
Author: Zhengguo Yang <ya...@gmail.com>
AuthorDate: Thu Apr 8 10:25:59 2021 +0800

    fix bitmap unit test failed (#5610)
---
 be/src/agent/cgroups_mgr.cpp                |  1 -
 be/src/agent/pusher.cpp                     |  1 -
 be/src/exec/odbc_connector.h                |  5 ++++-
 be/src/olap/schema_change.h                 |  4 +++-
 be/src/olap/task/engine_batch_load_task.cpp |  1 -
 be/src/util/bitmap_value.h                  |  9 +++++----
 be/test/exprs/bitmap_function_test.cpp      | 16 ++++++++++------
 7 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/be/src/agent/cgroups_mgr.cpp b/be/src/agent/cgroups_mgr.cpp
index 6c73ee9..edb274f 100644
--- a/be/src/agent/cgroups_mgr.cpp
+++ b/be/src/agent/cgroups_mgr.cpp
@@ -29,7 +29,6 @@
 #include <map>
 #include <sstream>
 
-#include "boost/filesystem.hpp"
 #include "common/logging.h"
 #include "olap/data_dir.h"
 #include "olap/storage_engine.h"
diff --git a/be/src/agent/pusher.cpp b/be/src/agent/pusher.cpp
index 90e3ad2..4fba068 100644
--- a/be/src/agent/pusher.cpp
+++ b/be/src/agent/pusher.cpp
@@ -27,7 +27,6 @@
 #include <string>
 
 #include "agent/cgroups_mgr.h"
-#include "boost/filesystem.hpp"
 #include "boost/lexical_cast.hpp"
 #include "gen_cpp/AgentService_types.h"
 #include "http/http_client.h"
diff --git a/be/src/exec/odbc_connector.h b/be/src/exec/odbc_connector.h
index 1e92022..e63f4b4 100644
--- a/be/src/exec/odbc_connector.h
+++ b/be/src/exec/odbc_connector.h
@@ -47,7 +47,7 @@ struct ODBCConnectorParam {
 
 // Because the DataBinding have the mem alloc, so
 // this class should not be copyable
-struct DataBinding : public boost::noncopyable {
+struct DataBinding {
     SQLSMALLINT target_type;
     SQLINTEGER buffer_length;
     SQLLEN strlen_or_ind;
@@ -56,6 +56,9 @@ struct DataBinding : public boost::noncopyable {
     DataBinding() = default;
 
     ~DataBinding() { free(target_value_ptr); }
+    DataBinding(const DataBinding&) = delete;
+    DataBinding& operator=(const DataBinding&) = delete;
+    
 };
 
 // ODBC Connector for scan data from ODBC
diff --git a/be/src/olap/schema_change.h b/be/src/olap/schema_change.h
index 543081d..452c341 100644
--- a/be/src/olap/schema_change.h
+++ b/be/src/olap/schema_change.h
@@ -180,7 +180,7 @@ private:
     DISALLOW_COPY_AND_ASSIGN(SchemaChangeWithSorting);
 };
 
-class SchemaChangeHandler : public boost::noncopyable {
+class SchemaChangeHandler {
 public:
     static SchemaChangeHandler* instance() { return &_s_instance; }
 
@@ -244,6 +244,8 @@ private:
 private:
     SchemaChangeHandler() : _mem_tracker(MemTracker::CreateTracker(-1, "SchemaChange")) {}
     virtual ~SchemaChangeHandler() {}
+    SchemaChangeHandler(const SchemaChangeHandler&) = delete;
+    SchemaChangeHandler& operator=(const SchemaChangeHandler&) = delete;
 
     std::shared_ptr<MemTracker> _mem_tracker;
     static SchemaChangeHandler _s_instance;
diff --git a/be/src/olap/task/engine_batch_load_task.cpp b/be/src/olap/task/engine_batch_load_task.cpp
index a2545e2..8d1b6d2 100644
--- a/be/src/olap/task/engine_batch_load_task.cpp
+++ b/be/src/olap/task/engine_batch_load_task.cpp
@@ -27,7 +27,6 @@
 #include <string>
 
 #include "agent/cgroups_mgr.h"
-#include "boost/filesystem.hpp"
 #include "boost/lexical_cast.hpp"
 #include "gen_cpp/AgentService_types.h"
 #include "http/http_client.h"
diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h
index b89569a..c228c0c 100644
--- a/be/src/util/bitmap_value.h
+++ b/be/src/util/bitmap_value.h
@@ -31,6 +31,7 @@
 #include <utility>
 
 #include "common/logging.h"
+#include "udf/udf.h"
 #include "util/coding.h"
 
 namespace doris {
@@ -1287,14 +1288,14 @@ public:
         return true;
     }
 
-    BigIntVal minimum() {
+    doris_udf::BigIntVal minimum() {
         switch (_type) {
         case SINGLE:
-            return BigIntVal(_sv);
+            return doris_udf::BigIntVal(_sv);
         case BITMAP:
-            return BigIntVal(_bitmap.minimum());
+            return doris_udf::BigIntVal(_bitmap.minimum());
         default:
-            return BigIntVal::null();
+            return doris_udf::BigIntVal::null();
         }
     }
 
diff --git a/be/test/exprs/bitmap_function_test.cpp b/be/test/exprs/bitmap_function_test.cpp
index 5c7e57c..9485ce1 100644
--- a/be/test/exprs/bitmap_function_test.cpp
+++ b/be/test/exprs/bitmap_function_test.cpp
@@ -220,21 +220,25 @@ TEST_F(BitmapFunctionsTest, bitmap_count) {
 
 TEST_F(BitmapFunctionsTest, bitmap_min) {
     BigIntVal result = BitmapFunctions::bitmap_min(ctx, StringVal::null());
-    ASSERT_TRUE(result.is_null());
+    ASSERT_TRUE(result.is_null);
 
-    StringVal empty_str = convert_bitmap_to_string(ctx, BitmapValue());
+    BitmapValue bitmap1;
+    StringVal empty_str = convert_bitmap_to_string(ctx, bitmap1);
     result = BitmapFunctions::bitmap_min(ctx, empty_str);
-    ASSERT_TRUE(result.is_null());
+    ASSERT_TRUE(result.is_null);
 
-    StringVal bitmap_str = convert_bitmap_to_string(ctx, BitmapValue(1024));
+    BitmapValue bitmap2 = BitmapValue(1024);
+    StringVal bitmap_str = convert_bitmap_to_string(ctx, bitmap2);
     result = BitmapFunctions::bitmap_min(ctx, bitmap_str);
     ASSERT_EQ(BigIntVal(1024), result);
 
-    bitmap_str = convert_bitmap_to_string(ctx, BitmapValue({1024, 1}));
+    BitmapValue bitmap3 = BitmapValue({1024, 1});
+    bitmap_str = convert_bitmap_to_string(ctx, bitmap3);
     result = BitmapFunctions::bitmap_min(ctx, bitmap_str);
     ASSERT_EQ(BigIntVal(1), result);
 
-    bitmap_str = convert_bitmap_to_string(ctx, BitmapValue({1024, 3, 2}));
+    BitmapValue bitmap4 = BitmapValue({1024, 3, 2});
+    bitmap_str = convert_bitmap_to_string(ctx, bitmap4);
     result = BitmapFunctions::bitmap_min(ctx, bitmap_str);
     ASSERT_EQ(BigIntVal(2), result);
 }

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