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
1 change: 0 additions & 1 deletion be/src/agent/cgroups_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion be/src/agent/pusher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion be/src/exec/odbc_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion be/src/olap/schema_change.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class SchemaChangeWithSorting : public SchemaChange {
DISALLOW_COPY_AND_ASSIGN(SchemaChangeWithSorting);
};

class SchemaChangeHandler : public boost::noncopyable {
class SchemaChangeHandler {
public:
static SchemaChangeHandler* instance() { return &_s_instance; }

Expand Down Expand Up @@ -244,6 +244,8 @@ class SchemaChangeHandler : public boost::noncopyable {
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;
Expand Down
1 change: 0 additions & 1 deletion be/src/olap/task/engine_batch_load_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions be/src/util/bitmap_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <utility>

#include "common/logging.h"
#include "udf/udf.h"
#include "util/coding.h"

namespace doris {
Expand Down Expand Up @@ -1287,14 +1288,14 @@ class BitmapValue {
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();
}
}

Expand Down
16 changes: 10 additions & 6 deletions be/test/exprs/bitmap_function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down