reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -21,7 +21,7 @@ namespace test {
|
||||
static common::ObArenaAllocator alloc_;
|
||||
// fake table to feed input for testing
|
||||
class ObFakeTable : public ObPhyOperator {
|
||||
public:
|
||||
public:
|
||||
const static int64_t COL0_RAND_STR = 0;
|
||||
const static int64_t COL1_ROW_ID = 1;
|
||||
const static int64_t COL2_ROW_ID_MOD_2 = 2;
|
||||
@ -39,11 +39,11 @@ class ObFakeTable : public ObPhyOperator {
|
||||
const static int64_t COL14_RAND_INT = 14;
|
||||
const static int64_t COL15_RAND_INT = 15;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
class ObFakeTableCtx : public ObPhyOperatorCtx {
|
||||
friend class ObFakeTable;
|
||||
|
||||
public:
|
||||
public:
|
||||
ObFakeTableCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx), get_count_(0)
|
||||
{
|
||||
buf_[0] = '\0';
|
||||
@ -55,15 +55,15 @@ class ObFakeTable : public ObPhyOperator {
|
||||
return ObPhyOperatorCtx::destroy_base();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
static const int VARCHAR_CELL_BUF_SIZE = 32;
|
||||
|
||||
private:
|
||||
private:
|
||||
int64_t get_count_;
|
||||
char buf_[VARCHAR_CELL_BUF_SIZE];
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
ObFakeTable();
|
||||
virtual ~ObFakeTable();
|
||||
virtual ObPhyOperatorType get_type() const
|
||||
@ -86,16 +86,16 @@ class ObFakeTable : public ObPhyOperator {
|
||||
n_segments_local_merge_sort_ = n_segments_local_merge_sort;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual int inner_get_next_row(ObExecContext& exec_ctx, const common::ObNewRow*& row) const;
|
||||
virtual int init_op_ctx(ObExecContext& ctx) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// types and constants
|
||||
// static const int COLUMN_COUNT = 16;
|
||||
static const int COLUMN_COUNT = 32;
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
ObFakeTable(const ObFakeTable& other);
|
||||
ObFakeTable& operator=(const ObFakeTable& other);
|
||||
@ -106,7 +106,7 @@ class ObFakeTable : public ObPhyOperator {
|
||||
int rand_int(int max) const;
|
||||
virtual int inner_create_operator_ctx(ObExecContext& exec_ctx, ObPhyOperatorCtx*& op_ctx) const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
int64_t row_count_;
|
||||
int64_t n_segments_local_merge_sort_;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ using namespace oceanbase::common;
|
||||
using oceanbase::sql::test::ObFakeTable;
|
||||
|
||||
class TestInMemorySortTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
struct ColumnOpt {
|
||||
int64_t col;
|
||||
ObCollationType cs_type;
|
||||
@ -34,12 +34,12 @@ class TestInMemorySortTest : public ::testing::Test {
|
||||
TestInMemorySortTest();
|
||||
virtual ~TestInMemorySortTest();
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
TestInMemorySortTest(const TestInMemorySortTest& other);
|
||||
TestInMemorySortTest& operator=(const TestInMemorySortTest& other);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
typedef ObSArray<ObSortColumn> ObSortColumns;
|
||||
void sort_test(
|
||||
int64_t row_count, ObArray<const ColumnOpt*>& columns, ObBaseSort* base_sort, int64_t column_keys_pos = -1);
|
||||
@ -48,7 +48,7 @@ class TestInMemorySortTest : public ::testing::Test {
|
||||
void serialize_test(int expect_ret);
|
||||
void sort_exception_test(int expect_ret);
|
||||
|
||||
private:
|
||||
private:
|
||||
int init(ObBaseSort* base_sort, ObFakeTable& input_table, int64_t row_count, ObArray<const ColumnOpt*>& columns,
|
||||
ObSortColumns& sort_columns);
|
||||
void cons_sort_columns(ObArray<const ColumnOpt*>& columns, ObSortColumns& sort_columns);
|
||||
|
@ -31,7 +31,7 @@ using namespace oceanbase::blocksstable;
|
||||
using oceanbase::sql::test::ObFakeTable;
|
||||
|
||||
class TestMergeSort : public ObMergeSort {
|
||||
public:
|
||||
public:
|
||||
TestMergeSort(ObIAllocator& alloc) : ObMergeSort(alloc)
|
||||
{}
|
||||
~TestMergeSort()
|
||||
@ -45,7 +45,7 @@ class TestMergeSortTest : public oceanbase::blocksstable::TestDataFilePrepare {
|
||||
static const int64_t MACRO_BLOCK_COUNT = 50 * 1024;
|
||||
static const uint64_t TENATN_ID = 1;
|
||||
|
||||
public:
|
||||
public:
|
||||
TestMergeSortTest();
|
||||
virtual ~TestMergeSortTest();
|
||||
virtual void SetUp();
|
||||
@ -53,18 +53,18 @@ class TestMergeSortTest : public oceanbase::blocksstable::TestDataFilePrepare {
|
||||
int init_tenant_mgr();
|
||||
void destroy_tenant_mgr();
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
TestMergeSortTest(const TestMergeSortTest& other);
|
||||
TestMergeSortTest& operator=(const TestMergeSortTest& other);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
typedef ObSArray<ObSortColumn> ObSortColumns;
|
||||
void sort_test(int64_t run_count, int64_t row_count, int64_t sort_col1, ObCollationType cs_type1, int64_t sort_col2,
|
||||
ObCollationType cs_type2);
|
||||
void sort_exception_test(int expect_ret);
|
||||
|
||||
private:
|
||||
private:
|
||||
int init_op(TestMergeSort& merge_sort, ObFakeTable& input_table, ObSortColumns& sort_cols, int64_t row_count,
|
||||
int64_t sort_col1, ObCollationType cs_type1, int64_t sort_col2, ObCollationType cs_type2);
|
||||
int init_data(TestMergeSort& merge_sort, ObBaseSort& in_mem_sort, ObFakeTable& input_table, ObSortColumns& sort_cols,
|
||||
@ -74,7 +74,7 @@ class TestMergeSortTest : public oceanbase::blocksstable::TestDataFilePrepare {
|
||||
void copy_cell_varchar(ObObj& cell, char* buf, int64_t buf_size);
|
||||
void cons_new_row(ObNewRow& row, int64_t column_count);
|
||||
|
||||
private:
|
||||
private:
|
||||
ObPhysicalPlan physical_plan_;
|
||||
ObArenaAllocator alloc_;
|
||||
};
|
||||
|
@ -38,16 +38,16 @@ using oceanbase::sql::test::ObFakeTable;
|
||||
#define TEST_SORT_DUMP_SET_HASH_AREA_SIZE(size) (set_sort_area_size(size))
|
||||
|
||||
class ObSortTest : public blocksstable::TestDataFilePrepare {
|
||||
public:
|
||||
public:
|
||||
ObSortTest();
|
||||
virtual ~ObSortTest();
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
ObSortTest(const ObSortTest& other);
|
||||
ObSortTest& operator=(const ObSortTest& other);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void SetUp() override
|
||||
{
|
||||
GCONF.enable_sql_operator_dump.set_value("True");
|
||||
@ -100,7 +100,7 @@ class ObSortTest : public blocksstable::TestDataFilePrepare {
|
||||
void serialize_test();
|
||||
void sort_exception_test(int expect_ret);
|
||||
|
||||
private:
|
||||
private:
|
||||
static void copy_cell_varchar(ObObj& cell, char* buf, int64_t buf_size)
|
||||
{
|
||||
ObString str;
|
||||
@ -127,7 +127,7 @@ class ObSortTest : public blocksstable::TestDataFilePrepare {
|
||||
};
|
||||
|
||||
class ObSortPlan {
|
||||
public:
|
||||
public:
|
||||
static ObSort& get_instance()
|
||||
{
|
||||
return *sort_;
|
||||
@ -192,7 +192,7 @@ class ObSortPlan {
|
||||
row_count_ = -1;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObSortPlan();
|
||||
static void cons_run_filename(ObString& filename)
|
||||
{
|
||||
@ -201,8 +201,8 @@ class ObSortPlan {
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
private:
|
||||
public:
|
||||
private:
|
||||
static ObPhysicalPlan* physical_plan_;
|
||||
static ObFakeTable* input_table_;
|
||||
static ObSort* sort_;
|
||||
@ -549,7 +549,7 @@ TEST_F(ObSortTest, prefix_merge_sort_test)
|
||||
}
|
||||
|
||||
class MockExpr : public ObSqlExpression {
|
||||
public:
|
||||
public:
|
||||
MockExpr(ObIAllocator& alloc, int64_t cnt) : ObSqlExpression(alloc)
|
||||
{
|
||||
set_item_count(1);
|
||||
|
@ -27,7 +27,7 @@ using namespace oceanbase::common;
|
||||
using oceanbase::sql::test::ObFakeTable;
|
||||
|
||||
class TestInMemorySpecificColumnsSortTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
struct ColumnOpt {
|
||||
int64_t col;
|
||||
ObCollationType cs_type;
|
||||
@ -36,12 +36,12 @@ class TestInMemorySpecificColumnsSortTest : public ::testing::Test {
|
||||
TestInMemorySpecificColumnsSortTest();
|
||||
virtual ~TestInMemorySpecificColumnsSortTest();
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
TestInMemorySpecificColumnsSortTest(const TestInMemorySpecificColumnsSortTest& other);
|
||||
TestInMemorySpecificColumnsSortTest& operator=(const TestInMemorySpecificColumnsSortTest& other);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
typedef ObSArray<ObSortColumn> ObSortColumns;
|
||||
void sort_test(
|
||||
int64_t row_count, ObArray<const ColumnOpt*>& columns, ObBaseSort* base_sort, int64_t column_keys_pos = -1);
|
||||
@ -50,7 +50,7 @@ class TestInMemorySpecificColumnsSortTest : public ::testing::Test {
|
||||
void serialize_test(int expect_ret);
|
||||
void sort_exception_test(int expect_ret);
|
||||
|
||||
private:
|
||||
private:
|
||||
int init(ObBaseSort* base_sort, ObFakeTable& input_table, int64_t row_count, ObArray<const ColumnOpt*>& columns,
|
||||
ObSortColumns& sort_columns);
|
||||
void cons_sort_columns(ObArray<const ColumnOpt*>& columns, ObSortColumns& sort_columns);
|
||||
|
@ -38,7 +38,7 @@ using namespace oceanbase::common;
|
||||
using namespace oceanbase::omt;
|
||||
|
||||
class TestSortImpl : public blocksstable::TestDataFilePrepare {
|
||||
public:
|
||||
public:
|
||||
TestSortImpl() : blocksstable::TestDataFilePrepare("TestDiskIR", 2 << 20, 1000), data_(alloc_)
|
||||
{}
|
||||
void set_sort_area_size(int64_t size)
|
||||
|
Reference in New Issue
Block a user