reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -307,7 +307,7 @@ namespace test {
|
||||
// };
|
||||
|
||||
class MockOptStatService : public oceanbase::common::ObOptStatService {
|
||||
public:
|
||||
public:
|
||||
static MockOptStatService& get_instance()
|
||||
{
|
||||
static MockOptStatService instance_;
|
||||
@ -375,14 +375,14 @@ class MockOptStatService : public oceanbase::common::ObOptStatService {
|
||||
tstat_ = oceanbase::common::ObOptStatManager::get_default_table_stat();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObOptTableStat tstat_;
|
||||
ObOptColumnStat cstat_;
|
||||
ObHistogram hist_;
|
||||
};
|
||||
|
||||
class MockOptStatManager : public oceanbase::common::ObOptStatManager {
|
||||
public:
|
||||
public:
|
||||
static MockOptStatManager& get_instance()
|
||||
{
|
||||
static MockOptStatManager instance_;
|
||||
|
||||
@ -27,7 +27,7 @@ class ObSchemaManager;
|
||||
} // namespace oceanbase
|
||||
namespace test {
|
||||
class ObMockPartMgr : public oceanbase::common::ObPartMgr {
|
||||
public:
|
||||
public:
|
||||
ObMockPartMgr() : schema_guard_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
namespace test {
|
||||
|
||||
class MockObPGPartition : public oceanbase::storage::ObPGPartition {
|
||||
public:
|
||||
public:
|
||||
MockObPGPartition()
|
||||
{}
|
||||
~MockObPGPartition()
|
||||
@ -34,12 +34,12 @@ class MockObPGPartition : public oceanbase::storage::ObPGPartition {
|
||||
return &storage_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
MockPartitionStorage storage_;
|
||||
};
|
||||
|
||||
class MockPartition : public oceanbase::storage::ObPartitionGroup {
|
||||
public:
|
||||
public:
|
||||
virtual oceanbase::storage::ObPartitionStorage* get_storage()
|
||||
{
|
||||
return NULL;
|
||||
@ -61,7 +61,7 @@ class MockPartition : public oceanbase::storage::ObPartitionGroup {
|
||||
return pg_partition_.storage_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
MockObPGPartition pg_partition_;
|
||||
};
|
||||
} // namespace test
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
using namespace oceanbase;
|
||||
namespace test {
|
||||
class MockPartitionService : public oceanbase::storage::ObPartitionService {
|
||||
public:
|
||||
public:
|
||||
MockPartitionService()
|
||||
{}
|
||||
virtual ~MockPartitionService()
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
namespace test {
|
||||
class MockPartitionStorage : public oceanbase::storage::ObPartitionStorage {
|
||||
public:
|
||||
public:
|
||||
MockPartitionStorage() : is_default_stat_(false)
|
||||
{}
|
||||
virtual ~MockPartitionStorage()
|
||||
@ -45,7 +45,7 @@ class MockPartitionStorage : public oceanbase::storage::ObPartitionStorage {
|
||||
is_default_stat_ = is_default_stat;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
bool is_default_stat_;
|
||||
};
|
||||
} // namespace test
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include "share/schema/ob_column_schema.h"
|
||||
namespace test {
|
||||
class MockTableStatService : public oceanbase::common::ObTableStatDataService {
|
||||
public:
|
||||
public:
|
||||
static const int64_t DEFAULT_ROW_COUNT = 100;
|
||||
static const int64_t DEFAULT_ROW_SIZE = 100;
|
||||
static const int64_t DEFAULT_DATA_SIZE = DEFAULT_ROW_COUNT * DEFAULT_ROW_SIZE;
|
||||
@ -60,12 +60,12 @@ class MockTableStatService : public oceanbase::common::ObTableStatDataService {
|
||||
table_stat_.set_row_count(row_count);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObTableStat table_stat_;
|
||||
};
|
||||
|
||||
class MockColumnStatService : public oceanbase::common::ObColumnStatDataService {
|
||||
public:
|
||||
public:
|
||||
MockColumnStatService()
|
||||
{}
|
||||
virtual ~MockColumnStatService()
|
||||
@ -133,7 +133,7 @@ class MockStatManager : public oceanbase::common::ObStatManager {
|
||||
static const int64_t DATE_MAX_VALUE = 2932896;
|
||||
static const int64_t DATE_MIN_VALUE = -354258;
|
||||
|
||||
public:
|
||||
public:
|
||||
struct ColumnStatInfo {
|
||||
ObObj min_;
|
||||
ObObj max_;
|
||||
@ -327,7 +327,7 @@ class MockStatManager : public oceanbase::common::ObStatManager {
|
||||
table2_row_count_ = table2_row_count;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
oceanbase::sql::ObSchemaChecker* schema_checker_;
|
||||
ObArenaAllocator allocator_;
|
||||
ObSEArray<ObColumnStat*, 8> column_stats_;
|
||||
|
||||
@ -34,7 +34,7 @@ using namespace sql;
|
||||
namespace common {
|
||||
|
||||
class ObMockIterWithLimit : public ObNewRowIterator {
|
||||
public:
|
||||
public:
|
||||
ObMockIterWithLimit() : need_row_count_(0), got_row_count_(0){};
|
||||
virtual ~ObMockIterWithLimit(){};
|
||||
|
||||
@ -53,7 +53,7 @@ class ObMockIterWithLimit : public ObNewRowIterator {
|
||||
return need_row_count_ == got_row_count_;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void advance_iter()
|
||||
{
|
||||
++got_row_count_;
|
||||
@ -91,7 +91,7 @@ class ObMockIterWithLimit : public ObNewRowIterator {
|
||||
|
||||
#define DECLARE_RANDOM_CELL_GEN(type) \
|
||||
class RANDOM_CELL_GEN_CLASS_NAME(type) : public RandomCellGen { \
|
||||
public: \
|
||||
public: \
|
||||
RANDOM_CELL_GEN_CLASS_NAME(type)() \
|
||||
{ \
|
||||
type_ = AT_(type); \
|
||||
@ -111,16 +111,16 @@ class ObMockIterWithLimit : public ObNewRowIterator {
|
||||
}
|
||||
|
||||
class ObStdinIter : public ObMockIterWithLimit {
|
||||
public:
|
||||
public:
|
||||
enum EOFBehavior { TERMINATE, REWIND, RANDOM };
|
||||
|
||||
private:
|
||||
private:
|
||||
EOFBehavior on_eof_;
|
||||
int64_t get_count_;
|
||||
bool pure_random_;
|
||||
|
||||
class IRandomCellGen {
|
||||
public:
|
||||
public:
|
||||
virtual ObObj gen(ObIAllocator& buf, int64_t seed) = 0;
|
||||
void set_max(ObObj max)
|
||||
{
|
||||
@ -136,7 +136,7 @@ class ObStdinIter : public ObMockIterWithLimit {
|
||||
};
|
||||
|
||||
class RandomCellGen : public IRandomCellGen {
|
||||
public:
|
||||
public:
|
||||
RandomCellGen()
|
||||
: type_(ObNullType), acc_(NULL), need_random(false), length(0), common_prefix_len(10), my_buf(NULL){};
|
||||
virtual ObObj gen(ObIAllocator& buf, int64_t seed) = 0;
|
||||
@ -185,7 +185,7 @@ class ObStdinIter : public ObMockIterWithLimit {
|
||||
char str_main_buf_[STR_MAIN_BUF_SIZE];
|
||||
int64_t str_main_buf_ptr;
|
||||
|
||||
public:
|
||||
public:
|
||||
ObStdinIter(ObIAllocator& buf)
|
||||
: on_eof_(TERMINATE),
|
||||
time_consumed_(0),
|
||||
@ -287,14 +287,14 @@ class ObStdinIter : public ObMockIterWithLimit {
|
||||
};
|
||||
static ObArenaAllocator alloc_;
|
||||
class MyMockOperator : public ObPhyOperator {
|
||||
public:
|
||||
public:
|
||||
mutable int64_t time_;
|
||||
|
||||
class MyMockCtx : public ObPhyOperatorCtx {
|
||||
|
||||
friend class MyMockOperator;
|
||||
|
||||
public:
|
||||
public:
|
||||
MyMockCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx)
|
||||
{
|
||||
UNUSED(ctx);
|
||||
|
||||
@ -38,18 +38,18 @@ using namespace oceanbase::json;
|
||||
|
||||
namespace test {
|
||||
class ObLogPlanTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
ObLogPlanTest();
|
||||
virtual ~ObLogPlanTest();
|
||||
virtual void SetUp();
|
||||
virtual void TearDown();
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
ObLogPlanTest(const ObLogPlanTest& other);
|
||||
ObLogPlanTest& operator=(const ObLogPlanTest& other);
|
||||
|
||||
private:
|
||||
private:
|
||||
// data members
|
||||
};
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ class Path;
|
||||
} // namespace oceanbase
|
||||
namespace test {
|
||||
class TestJoinOrder : public TestOptimizerUtils {
|
||||
public:
|
||||
public:
|
||||
TestJoinOrder()
|
||||
{}
|
||||
~TestJoinOrder()
|
||||
|
||||
@ -19,13 +19,13 @@ using namespace oceanbase::json;
|
||||
// using namespace oceanbase::sql;
|
||||
|
||||
class TestJsonFormat : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
TestJsonFormat(){};
|
||||
virtual ~TestJsonFormat(){};
|
||||
virtual void SetUp(){};
|
||||
virtual void TearDown(){};
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy and assign
|
||||
TestJsonFormat(const TestJsonFormat& other);
|
||||
TestJsonFormat& operator=(const TestJsonFormat& ohter);
|
||||
|
||||
@ -24,7 +24,7 @@ using namespace oceanbase::sql;
|
||||
using namespace oceanbase::observer;
|
||||
namespace test {
|
||||
class TestLocationPartitionId : public TestOptimizerUtils {
|
||||
public:
|
||||
public:
|
||||
TestLocationPartitionId()
|
||||
{}
|
||||
~TestLocationPartitionId()
|
||||
|
||||
@ -36,7 +36,7 @@ class TestOptEstSel : public TestOptimizerUtils {
|
||||
};
|
||||
static const uint8_t YEAR_MAX_VALUE = 10;
|
||||
|
||||
public:
|
||||
public:
|
||||
TestOptEstSel();
|
||||
virtual ~TestOptEstSel();
|
||||
virtual void SetUp();
|
||||
@ -56,14 +56,14 @@ class TestOptEstSel : public TestOptimizerUtils {
|
||||
void get_log_plan(ObStmt& stmt, ObLogPlan*& plan);
|
||||
void run_test(const char* test_file, const char* result_file, const char* tmp_file, int64_t flag);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ObOptimizerContext* optctx_;
|
||||
ObAddr addr_;
|
||||
ObQueryHint query_hint_;
|
||||
bool is_datetime_;
|
||||
oceanbase::sql::ObSchemaChecker schema_checker_;
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
DISALLOW_COPY_AND_ASSIGN(TestOptEstSel);
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ using namespace oceanbase::observer;
|
||||
|
||||
namespace test {
|
||||
class TestOptimizer : public TestOptimizerUtils {
|
||||
public:
|
||||
public:
|
||||
TestOptimizer()
|
||||
{}
|
||||
~TestOptimizer()
|
||||
|
||||
@ -48,17 +48,17 @@ using oceanbase::sql::ObTableLocation;
|
||||
namespace test {
|
||||
|
||||
class MockCacheObjectFactory {
|
||||
public:
|
||||
public:
|
||||
static int alloc(ObCacheObject*& cache_obj, ObCacheObjType co_type, uint64_t tenant_id = common::OB_SERVER_TENANT_ID);
|
||||
static int alloc(ObPhysicalPlan*& plan, uint64_t tenant_id = common::OB_SERVER_TENANT_ID);
|
||||
static void free(ObCacheObject* cache_obj);
|
||||
|
||||
private:
|
||||
private:
|
||||
static void inner_free(ObCacheObject*);
|
||||
};
|
||||
|
||||
class TestOptimizerUtils : public TestSqlUtils, public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
TestOptimizerUtils();
|
||||
virtual ~TestOptimizerUtils();
|
||||
virtual void init();
|
||||
@ -132,7 +132,7 @@ class TestOptimizerUtils : public TestSqlUtils, public ::testing::Test {
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
int64_t case_id_;
|
||||
ObOptimizerContext* optctx_;
|
||||
bool is_json_;
|
||||
@ -146,7 +146,7 @@ class TestOptimizerUtils : public TestSqlUtils, public ::testing::Test {
|
||||
::test::MockOptStatService opt_stat_;
|
||||
::test::MockPartitionService partition_service_;
|
||||
// data members
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
DISALLOW_COPY_AND_ASSIGN(TestOptimizerUtils);
|
||||
// function members
|
||||
|
||||
@ -28,7 +28,7 @@ using namespace oceanbase::storage;
|
||||
using namespace oceanbase::share;
|
||||
namespace test {
|
||||
class ObRoutePolicyTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
ObRoutePolicyTest() : addr_(), part_service_(), route_policy_(addr_, part_service_), route_policy_ctx_()
|
||||
{
|
||||
route_policy_.has_readonly_zone_ = true;
|
||||
@ -41,7 +41,7 @@ class ObRoutePolicyTest : public ::testing::Test {
|
||||
ObRoutePolicy::PositionType pos_type, ObRoutePolicy::MergeStatus merge_status, ObZoneType zone_type,
|
||||
oceanbase::share::ObZoneStatus::Status zone_status);
|
||||
|
||||
public:
|
||||
public:
|
||||
ObAddr addr_;
|
||||
ObPartitionService part_service_;
|
||||
ObRoutePolicy route_policy_;
|
||||
|
||||
@ -21,7 +21,7 @@ using namespace oceanbase::common;
|
||||
namespace test {
|
||||
|
||||
class ObSkylinePrunningTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
ObSkylinePrunningTest()
|
||||
{}
|
||||
virtual ~ObSkylinePrunningTest()
|
||||
@ -47,7 +47,7 @@ class ObSkylinePrunningTest : public ::testing::Test {
|
||||
const uint64_t* filter_ids, const int64_t filter_cnt, const uint64_t* interest_ids, const int64_t interest_cnt,
|
||||
const uint64_t* range_ids, const int64_t range_cnt);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ObArenaAllocator allocator_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user