reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -20,7 +20,7 @@
namespace oceanbase {
namespace sql {
class JoinDataGenerator : public ObPhyOperator {
public:
public:
const static int64_t CELL_CNT = 4;
const static int64_t ROW_ID_CELL = 0;
@ -31,7 +31,7 @@ class JoinDataGenerator : public ObPhyOperator {
const static int64_t INT_VARCHAR_BUF_SIZE = 10;
class Ctx : public ObPhyOperatorCtx {
public:
public:
Ctx(ObExecContext& c) : ObPhyOperatorCtx(c)
{}
virtual void destroy()
@ -169,7 +169,7 @@ class JoinDataGenerator : public ObPhyOperator {
cells_[STR_CELL].set_varchar(str_, string_size_);
}
public:
public:
bool gen_varchar_cell_ = false;
int64_t row_cnt_ = 1;
bool reverse_ = false;
@ -181,7 +181,7 @@ class JoinDataGenerator : public ObPhyOperator {
IdValFunc idx_val_ = [](const int64_t v) { return v; };
int iter_end_ret_ = OB_ITER_END;
private:
private:
mutable common::ObNewRow row_;
mutable common::ObObj cells_[CELL_CNT];
mutable int64_t row_id_ = 0;

View File

@ -34,7 +34,7 @@ using namespace oceanbase::observer;
using namespace oceanbase::share;
class MockSqlExpression : public ObSqlExpression {
public:
public:
MockSqlExpression() : ObSqlExpression(alloc_)
{
set_item_count(10);
@ -44,11 +44,11 @@ class MockSqlExpression : public ObSqlExpression {
};
class ObHashJoinTest : public ::testing::Test {
public:
public:
ObHashJoinTest();
virtual ~ObHashJoinTest();
protected:
protected:
void join_test(int64_t case_id, ObJoinType join_type);
void serialize_test();
void join_exception_test(int expect_ret);
@ -58,12 +58,12 @@ class ObHashJoinTest : public ::testing::Test {
ObHashJoinTest(const ObHashJoinTest& other);
ObHashJoinTest& operator=(const ObHashJoinTest& other);
private:
private:
// data members
};
class ObHashJoinPlan {
public:
public:
static ObHashJoin& get_instance()
{
return hash_join_;
@ -129,7 +129,7 @@ class ObHashJoinPlan {
allocator_.reuse();
}
private:
private:
static void set_id()
{
hash_join_.set_id(0);
@ -201,10 +201,10 @@ class ObHashJoinPlan {
return ret;
}
private:
private:
ObHashJoinPlan();
private:
private:
static ObPhysicalPlan phy_plan_;
static MockSqlExpression equal_expr_[2];
static MockSqlExpression other_expr_[2];

View File

@ -43,7 +43,7 @@ typedef struct {
} JoinData;
class ObQueryRangeDummy {
public:
public:
ObQueryRangeDummy() : scan_key_value_(0)
{}
~ObQueryRangeDummy()
@ -57,12 +57,12 @@ class ObQueryRangeDummy {
return scan_key_value_;
}
private:
private:
int64_t scan_key_value_;
};
class ObJoinFakeTableScanInput : public ObIPhyOperatorInput {
public:
public:
virtual int init(ObExecContext& ctx, ObTaskInfo& task_info, ObPhyOperator& op)
{
UNUSED(ctx);
@ -81,16 +81,16 @@ class ObJoinFakeTableScanInput : public ObIPhyOperatorInput {
return query_range_;
}
private:
private:
ObQueryRangeDummy query_range_;
};
static ObArenaAllocator alloc_;
class ObJoinFakeTable : public ObPhyOperator {
protected:
protected:
class ObJoinFakeTableCtx : public ObPhyOperatorCtx {
friend class ObJoinFakeTable;
public:
public:
ObJoinFakeTableCtx(ObExecContext& exex_ctx) : ObPhyOperatorCtx(exex_ctx), iter_(0)
{}
virtual void destroy()
@ -98,12 +98,12 @@ class ObJoinFakeTable : public ObPhyOperator {
return ObPhyOperatorCtx::destroy_base();
}
private:
private:
int64_t iter_;
common::ObAddr server_;
};
public:
public:
ObJoinFakeTable();
virtual ~ObJoinFakeTable();
int init(JoinOpTestType join_op_type);
@ -123,18 +123,18 @@ class ObJoinFakeTable : public ObPhyOperator {
virtual int create_operator_input(ObExecContext& exec_ctx) const;
virtual int inner_get_next_row(ObExecContext& exec_ctx, const common::ObNewRow*& row) const;
public:
public:
int prepare_data(int64_t case_id, TableType table_type, ObJoinType join_type);
void set_type(ObPhyOperatorType op_type)
{
op_type_ = op_type;
}
private:
private:
int cons_row(int64_t col1, int64_t col2, common::ObNewRow& row) const;
int cons_row(int64_t col1, int64_t col2, int64_t col3, int64_t col4, common::ObNewRow& row) const;
private:
private:
int64_t (*left_data_)[2];
int64_t (*right_data_)[2];
int64_t (*out_data_)[4];

View File

@ -32,7 +32,7 @@ using namespace oceanbase::common;
using namespace oceanbase::observer;
using namespace oceanbase::share;
class MockSqlExpression : public ObSqlExpression {
public:
public:
MockSqlExpression() : ObSqlExpression(alloc_)
{
set_item_count(10);
@ -42,11 +42,11 @@ class MockSqlExpression : public ObSqlExpression {
};
class ObMergeJoinTest : public ::testing::Test {
public:
public:
ObMergeJoinTest();
virtual ~ObMergeJoinTest();
protected:
protected:
void join_test(int64_t case_id, ObJoinType join_type);
void serialize_test();
void join_exception_test(int expect_ret);
@ -55,12 +55,12 @@ class ObMergeJoinTest : public ::testing::Test {
ObMergeJoinTest(const ObMergeJoinTest& other);
ObMergeJoinTest& operator=(const ObMergeJoinTest& other);
private:
private:
// data members
};
class ObMergeJoinPlan {
public:
public:
static ObMergeJoin& get_instance()
{
return merge_join_;
@ -131,7 +131,7 @@ class ObMergeJoinPlan {
allocator_.reuse();
}
private:
private:
static void set_id()
{
merge_join_.set_id(0);
@ -203,10 +203,10 @@ class ObMergeJoinPlan {
return ret;
}
private:
private:
ObMergeJoinPlan();
private:
private:
static ObPhysicalPlan phy_plan_;
static MockSqlExpression equal_expr_[2];
static MockSqlExpression other_expr_[2];

View File

@ -24,11 +24,11 @@ using namespace oceanbase::sql::test;
using namespace oceanbase::common;
class ObNestedLoopJoinTest : public ::testing::Test {
public:
public:
ObNestedLoopJoinTest();
virtual ~ObNestedLoopJoinTest();
protected:
protected:
void join_test(int64_t case_id, ObJoinType join_type);
void serialize_test();
void join_exception_test(int expect_ret);
@ -37,12 +37,12 @@ class ObNestedLoopJoinTest : public ::testing::Test {
ObNestedLoopJoinTest(const ObNestedLoopJoinTest& other);
ObNestedLoopJoinTest& operator=(const ObNestedLoopJoinTest& other);
private:
private:
// data members
};
class ObNestedLoopJoinPlan {
public:
public:
static ObNestedLoopJoin& get_instance()
{
return nested_loop_join_;
@ -88,7 +88,7 @@ class ObNestedLoopJoinPlan {
allocator_.reuse();
}
private:
private:
static void set_id()
{
nested_loop_join_.set_id(0);
@ -152,10 +152,10 @@ class ObNestedLoopJoinPlan {
return ret;
}
private:
private:
ObNestedLoopJoinPlan();
private:
private:
static ObPhysicalPlan phy_plan_;
static ObSqlExpression equal_expr_[2];
static ObSqlExpression other_expr_[2];

View File

@ -33,7 +33,7 @@ using namespace share;
using namespace omt;
class MockSqlExpression : public ObSqlExpression {
public:
public:
MockSqlExpression(ObIAllocator& alloc) : ObSqlExpression(alloc)
{
set_item_count(10);
@ -44,7 +44,7 @@ class MockSqlExpression : public ObSqlExpression {
#define TEST_HJ_DUMP_SET_HASH_AREA_SIZE(size) (set_hash_area_size(size))
class ObHashJoinDumpTest : public blocksstable::TestDataFilePrepare, public ::testing::WithParamInterface<ObJoinType> {
public:
public:
ObHashJoinDumpTest()
: blocksstable::TestDataFilePrepare("TestDiskIR", 2 << 20, 5000),
hash_join_(alloc_),
@ -105,7 +105,7 @@ class ObHashJoinDumpTest : public blocksstable::TestDataFilePrepare, public ::te
// iterate hash join result and verify result with merge join.
void run_test(int64_t print_row_cnt = 0);
protected:
protected:
struct JoinPlan {
explicit JoinPlan(ObJoin& join, ObIAllocator& alloc) : join_(join), left_(alloc), right_(alloc), expr_(alloc)
{}