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

@ -33,7 +33,7 @@ namespace sql {
class ObChunkDatumStore {
OB_UNIS_VERSION_V(1);
public:
public:
static inline int row_copy_size(const common::ObIArray<ObExpr*>& exprs, ObEvalCtx& ctx, int64_t& size)
{
int ret = OB_SUCCESS;
@ -119,7 +119,7 @@ class ObChunkDatumStore {
*/
template <typename T = ObChunkDatumStore::StoredRow>
class LastStoredRow {
public:
public:
LastStoredRow(ObIAllocator& alloc) : store_row_(nullptr), alloc_(alloc), max_size_(0), reuse_(false)
{}
~LastStoredRow()
@ -225,7 +225,7 @@ class ObChunkDatumStore {
template <typename T = ObChunkDatumStore::StoredRow>
class ShadowStoredRow {
public:
public:
ShadowStoredRow() : alloc_(nullptr), store_row_(nullptr), saved_(false)
{}
~ShadowStoredRow()
@ -303,7 +303,7 @@ class ObChunkDatumStore {
}
TO_STRING_KV(KPC_(store_row));
private:
private:
common::ObIAllocator* alloc_;
T* store_row_;
bool saved_;
@ -417,7 +417,7 @@ class ObChunkDatumStore {
} __attribute__((packed));
struct BlockList {
public:
public:
BlockList() : head_(NULL), last_(NULL), size_(0)
{}
inline int64_t get_size() const
@ -468,7 +468,7 @@ class ObChunkDatumStore {
}
TO_STRING_KV(K_(size), K_(head), K_(last), K_(*head), K_(last));
private:
private:
Block* head_;
Block* last_;
int64_t size_;
@ -488,7 +488,7 @@ class ObChunkDatumStore {
* |----------------|
* */
class BlockBuffer {
public:
public:
static const int64_t HEAD_SIZE = sizeof(Block); /* n_rows, check_sum */
BlockBuffer() : data_(NULL), cur_pos_(0), cap_(0)
{}
@ -550,7 +550,7 @@ class ObChunkDatumStore {
friend ObChunkDatumStore;
friend Block;
private:
private:
union {
char* data_;
Block* block;
@ -561,7 +561,7 @@ class ObChunkDatumStore {
class ChunkIterator;
class RowIterator {
public:
public:
friend class ObChunkDatumStore;
RowIterator();
virtual ~RowIterator()
@ -595,7 +595,7 @@ class ObChunkDatumStore {
TO_STRING_KV(KP_(store), K_(*store), K_(cur_iter_blk), K_(cur_row_in_blk), K_(cur_pos_in_blk), K_(n_blocks),
K_(cur_nth_block));
private:
private:
explicit RowIterator(ObChunkDatumStore* row_store);
void reset_cursor()
{
@ -606,7 +606,7 @@ class ObChunkDatumStore {
cur_nth_block_ = 0;
}
protected:
protected:
ObChunkDatumStore* store_;
Block* cur_iter_blk_;
int64_t cur_row_in_blk_; // cur nth row in cur block for in-mem debug
@ -616,10 +616,10 @@ class ObChunkDatumStore {
};
class ChunkIterator {
public:
public:
enum IterEndState { PROCESSING = 0x00, MEM_ITER_END = 0x01, DISK_ITER_END = 0x02 };
public:
public:
friend class ObChunkDatumStore;
ChunkIterator();
virtual ~ChunkIterator();
@ -674,10 +674,10 @@ class ObChunkDatumStore {
TO_STRING_KV(KP_(store), KP_(cur_iter_blk), KP_(cur_iter_blk_buf), K_(cur_chunk_n_blocks), K_(cur_iter_pos),
K_(file_size), K_(chunk_read_size), KP_(chunk_mem));
private:
private:
void reset_cursor(const int64_t file_size);
protected:
protected:
ObChunkDatumStore* store_;
Block* cur_iter_blk_;
BlockBuffer* cur_iter_blk_buf_; /*for reuse of cur_iter_blk_;
@ -701,7 +701,7 @@ class ObChunkDatumStore {
};
class Iterator {
public:
public:
friend class ObChunkDatumStore;
Iterator() : start_iter_(false)
{}
@ -742,16 +742,16 @@ class ObChunkDatumStore {
return chunk_it_.get_chunk_read_size();
}
private:
private:
explicit Iterator(ObChunkDatumStore* row_store);
protected:
protected:
bool start_iter_;
ChunkIterator chunk_it_;
RowIterator row_it_;
};
public:
public:
const static int64_t BLOCK_SIZE = (64L << 10);
static const int32_t DATUM_SIZE = sizeof(common::ObDatum);
@ -894,7 +894,7 @@ class ObChunkDatumStore {
int update_iterator(Iterator& org_it);
int clean_block(Block* clean_block);
private:
private:
OB_INLINE int add_row(
const common::ObIArray<ObExpr*>& exprs, ObEvalCtx* ctx, const int64_t row_size, StoredRow** stored_row);
static int get_timeout(int64_t& timeout_ms);
@ -944,7 +944,7 @@ class ObChunkDatumStore {
callback_->free(size);
}
private:
private:
bool inited_;
uint64_t tenant_id_;
const char* label_;

View File

@ -31,7 +31,7 @@ namespace sql {
class ObChunkRowStore {
OB_UNIS_VERSION_V(1);
public:
public:
enum STORE_MODE { /* e.g. [0, 1, 2] with projector (0, 2) */
WITHOUT_PROJECTOR = 0, /* store [0, 2] get [0, 2] */
FULL /* store [0, 1, 2] get [0, 1, 2] with(0, 2) */
@ -146,7 +146,7 @@ class ObChunkRowStore {
} __attribute__((packed));
struct BlockList {
public:
public:
BlockList() : head_(NULL), last_(NULL), size_(0)
{}
inline int64_t get_size() const
@ -197,7 +197,7 @@ class ObChunkRowStore {
}
TO_STRING_KV(K_(size), K_(head), K_(last), K_(*head), K_(last));
private:
private:
Block* head_;
Block* last_;
int64_t size_;
@ -217,7 +217,7 @@ class ObChunkRowStore {
* |----------------|
* */
class BlockBuffer {
public:
public:
static const int64_t HEAD_SIZE = sizeof(Block); /* n_rows, check_sum */
BlockBuffer() : data_(NULL), cur_pos_(0), cap_(0)
{}
@ -279,7 +279,7 @@ class ObChunkRowStore {
friend ObChunkRowStore;
friend Block;
private:
private:
union {
char* data_;
Block* block;
@ -290,7 +290,7 @@ class ObChunkRowStore {
class ChunkIterator;
class RowIterator {
public:
public:
friend class ObChunkRowStore;
RowIterator();
virtual ~RowIterator()
@ -325,7 +325,7 @@ class ObChunkRowStore {
TO_STRING_KV(KP_(store), K_(*store), K_(cur_iter_blk), K_(cur_row_in_blk), K_(cur_pos_in_blk), K_(n_blocks),
K_(cur_nth_block));
private:
private:
explicit RowIterator(ObChunkRowStore* row_store);
void reset_cursor()
{
@ -336,7 +336,7 @@ class ObChunkRowStore {
cur_nth_block_ = 0;
}
protected:
protected:
ObChunkRowStore* store_;
Block* cur_iter_blk_;
common::ObNewRow row_;
@ -347,10 +347,10 @@ class ObChunkRowStore {
};
class ChunkIterator {
public:
public:
enum IterEndState { PROCESSING = 0x00, MEM_ITER_END = 0x01, DISK_ITER_END = 0x02 };
public:
public:
friend class ObChunkRowStore;
ChunkIterator();
virtual ~ChunkIterator();
@ -405,10 +405,10 @@ class ObChunkRowStore {
TO_STRING_KV(KP_(store), KP_(cur_iter_blk), KP_(cur_iter_blk_buf), K_(cur_chunk_n_blocks), K_(cur_iter_pos),
K_(file_size), K_(chunk_read_size), KP_(chunk_mem));
private:
private:
void reset_cursor(const int64_t file_size);
protected:
protected:
ObChunkRowStore* store_;
Block* cur_iter_blk_;
BlockBuffer* cur_iter_blk_buf_; /*for reuse of cur_iter_blk_;
@ -432,7 +432,7 @@ class ObChunkRowStore {
}
class Iterator : public common::ObOuterRowIterator {
public:
public:
friend class ObChunkRowStore;
Iterator() : start_iter_(false), convert_row_with_obj_fun_(NULL), convert_row_fun_(NULL)
{}
@ -474,14 +474,14 @@ class ObChunkRowStore {
return (this->*convert_row_fun_)(row_it_, row, sr);
}
private:
private:
explicit Iterator(ObChunkRowStore* row_store);
CONVERT_FUN(convert_to_row, , common::ObNewRow*&)
CONVERT_FUN(convert_to_row, _with_obj, common::ObNewRow&)
CONVERT_FUN(convert_to_row_full, , common::ObNewRow*&)
CONVERT_FUN(convert_to_row_full, _with_obj, common::ObNewRow&)
protected:
protected:
bool start_iter_;
ChunkIterator chunk_it_;
RowIterator row_it_;
@ -489,7 +489,7 @@ class ObChunkRowStore {
int (Iterator::*convert_row_fun_)(RowIterator& it, ObNewRow*& row, const StoredRow* sr);
};
public:
public:
const static int64_t BLOCK_SIZE = (64L << 10); //+ BlockBuffer::HEAD_SIZE;
explicit ObChunkRowStore(common::ObIAllocator* alloc = NULL);
@ -613,7 +613,7 @@ class ObChunkRowStore {
int alloc_dir_id();
TO_STRING_KV(K_(tenant_id), K_(label), K_(ctx_id), K_(mem_limit), K_(row_cnt), K_(file_size));
private:
private:
static int get_timeout(int64_t& timeout_ms);
void* alloc_blk_mem(const int64_t size, const bool for_iterator);
void free_blk_mem(void* mem, const int64_t size = 0);
@ -663,7 +663,7 @@ class ObChunkRowStore {
}
}
private:
private:
bool inited_;
uint64_t tenant_id_;
const char* label_;
@ -723,7 +723,7 @@ inline int ObChunkRowStore::BlockBuffer::advance(int64_t size)
}
class ObChunkStoreUtil {
public:
public:
static int alloc_dir_id(int64_t& dir_id);
};

View File

@ -21,11 +21,11 @@ class ObSqlExpression;
class ObCount : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
public:
public:
class ObCountCtx : ObPhyOperatorCtx {
friend class ObCount;
public:
public:
explicit ObCountCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx), cur_rownum_(1), has_rownum_limit_(false), rownum_limit_value_(-1)
{}
@ -34,13 +34,13 @@ class ObCount : public ObSingleChildPhyOperator {
ObPhyOperatorCtx::destroy_base();
}
public:
public:
int64_t cur_rownum_;
bool has_rownum_limit_;
int64_t rownum_limit_value_;
};
public:
public:
explicit ObCount(common::ObIAllocator& alloc);
virtual ~ObCount();
virtual int get_next_row(ObExecContext& ctx, const common::ObNewRow*& row) const;
@ -54,7 +54,7 @@ class ObCount : public ObSingleChildPhyOperator {
int add_anti_monotone_filter_exprs(ObSqlExpression* expr);
virtual int switch_iterator(ObExecContext& ctx) const;
private:
private:
bool is_valid() const;
int get_rownum_limit_value(ObExecContext& ctx, int64_t& rownum_limit_value) const;
int get_int_value(ObExecContext& ctx, const ObSqlExpression* in_val, int64_t& out_val) const;
@ -89,7 +89,7 @@ class ObCount : public ObSingleChildPhyOperator {
*/
virtual int64_t to_string_kv(char* buf, const int64_t buf_len) const;
private:
private:
ObSqlExpression* rownum_limit_expr_;
common::ObDList<ObSqlExpression> anti_monotone_filter_exprs_;
};

View File

@ -21,7 +21,7 @@ namespace sql {
class ObCountSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObCountSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type);
INHERIT_TO_STRING_KV("op_spec", ObOpSpec, K_(rownum_limit), K_(anti_monotone_filters));
@ -30,7 +30,7 @@ class ObCountSpec : public ObOpSpec {
};
class ObCountOp : public ObOperator {
public:
public:
ObCountOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
@ -52,12 +52,12 @@ class ObCountOp : public ObOperator {
return cur_rownum_;
}
private:
private:
// reset default value of %cur_rownum_ && %rownum_limit_
void reset_default();
int get_rownum_limit();
private:
private:
int64_t cur_rownum_;
int64_t rownum_limit_;
};

View File

@ -27,7 +27,7 @@ namespace sql {
OB_SERIALIZE_MEMBER(ObExprValuesInput, partition_id_values_);
class ObExprValues::ObExprValuesCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObExprValuesCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx),
node_idx_(0),
@ -44,7 +44,7 @@ class ObExprValues::ObExprValuesCtx : public ObPhyOperatorCtx {
ObPhyOperatorCtx::destroy_base();
}
private:
private:
int64_t node_idx_;
ObIterExprCtx iter_expr_ctx_;
int64_t value_count_;

View File

@ -22,7 +22,7 @@ class ObIterExprRangeParam;
class ObExprValuesInput : public ObIPhyOperatorInput {
OB_UNIS_VERSION_V(1);
public:
public:
ObExprValuesInput() : partition_id_values_(0)
{}
virtual ~ObExprValuesInput()
@ -38,14 +38,14 @@ class ObExprValuesInput : public ObIPhyOperatorInput {
return PHY_EXPR_VALUES;
}
public:
public:
int64_t partition_id_values_;
};
class ObExprValues : public ObNoChildrenPhyOperator {
class ObExprValuesCtx;
public:
public:
explicit ObExprValues(common::ObIAllocator& alloc);
virtual ~ObExprValues();
@ -70,10 +70,10 @@ class ObExprValues : public ObNoChildrenPhyOperator {
return deserialize_(buf, data_len, pos);
}
private:
private:
const static int64_t UNIS_VERSION = 1;
private:
private:
// function members
/**
* @brief init operator context, will create a physical operator context (and a current row space)
@ -102,10 +102,10 @@ class ObExprValues : public ObNoChildrenPhyOperator {
int calc_next_row(ObExecContext& ctx) const;
int calc_next_row_by_range_param(ObExprValuesCtx& value_ctx, const common::ObNewRow*& row) const;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExprValues);
private:
private:
// data members
common::ObFixedArray<ObSqlExpression*, common::ObIAllocator> values_;
common::ObFixedArray<ObIterExprRangeParam*, common::ObIAllocator> range_params_;

View File

@ -23,7 +23,7 @@ class ObPhyOpSeriCtx;
class ObExprValuesOpInput : public ObOpInput {
OB_UNIS_VERSION_V(1);
public:
public:
ObExprValuesOpInput(ObExecContext& ctx, const ObOpSpec& spec) : ObOpInput(ctx, spec), partition_id_values_(0)
{}
virtual ~ObExprValuesOpInput()
@ -36,14 +36,14 @@ class ObExprValuesOpInput : public ObOpInput {
return common::OB_SUCCESS;
}
public:
public:
int64_t partition_id_values_;
};
class ObExprValuesSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObExprValuesSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type)
: ObOpSpec(alloc, type), values_(alloc), str_values_array_(alloc)
{}
@ -57,16 +57,16 @@ class ObExprValuesSpec : public ObOpSpec {
virtual int64_t get_serialize_size(const ObPhyOpSeriCtx& seri_ctx) const override;
int64_t get_serialize_size_(const ObPhyOpSeriCtx& seri_ctx) const;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExprValuesSpec);
public:
public:
common::ObFixedArray<ObExpr*, common::ObIAllocator> values_;
common::ObFixedArray<ObStrValues, common::ObIAllocator> str_values_array_;
};
class ObExprValuesOp : public ObOperator {
public:
public:
ObExprValuesOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
virtual int rescan() override;
@ -82,14 +82,14 @@ class ObExprValuesOp : public ObOperator {
ObOperator::destroy();
}
private:
private:
int calc_next_row();
int get_value_count();
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExprValuesOp);
private:
private:
int64_t node_idx_;
int64_t vector_index_;
ObDatumCaster datum_caster_;

View File

@ -24,7 +24,7 @@ using namespace common;
using namespace share;
namespace sql {
class ObExprValuesWithChild::ObExprValuesWithChildCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObExprValuesWithChildCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx), node_idx_(0)
{}
~ObExprValuesWithChildCtx()
@ -34,7 +34,7 @@ class ObExprValuesWithChild::ObExprValuesWithChildCtx : public ObPhyOperatorCtx
ObPhyOperatorCtx::destroy_base();
}
private:
private:
int64_t node_idx_;
friend class ObExprValuesWithChild;
};

View File

@ -21,7 +21,7 @@ class ObIterExprRangeParam;
class ObExprValuesWithChild : public ObSingleChildPhyOperator {
class ObExprValuesWithChildCtx;
public:
public:
explicit ObExprValuesWithChild(common::ObIAllocator& alloc);
virtual ~ObExprValuesWithChild();
@ -51,10 +51,10 @@ class ObExprValuesWithChild : public ObSingleChildPhyOperator {
return deserialize_(buf, data_len, pos);
}
private:
private:
const static int64_t UNIS_VERSION = 1;
private:
private:
// function members
/**
* @brief init operator context, will create a physical operator context (and a current row space)
@ -90,10 +90,10 @@ class ObExprValuesWithChild : public ObSingleChildPhyOperator {
int calc_next_row(ObExecContext& ctx) const;
int64_t get_serialize_size_(const ObPhyOpSeriCtx& seri_ctx) const;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExprValuesWithChild);
private:
private:
// data members
common::ObFixedArray<ObSqlExpression*, common::ObIAllocator> values_;
};

View File

@ -105,7 +105,7 @@ struct TempHashPartCols : public HashPartCols {
template <typename Item>
class ObPartitionExtendHashTable {
public:
public:
const static int64_t INITIAL_SIZE = 128;
const static int64_t SIZE_BUCKET_PERCENT = 80;
const static int64_t MAX_MEM_PERCENT = 40;
@ -203,14 +203,14 @@ class ObPartitionExtendHashTable {
sql_mem_processor_ = sql_mem_processor;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObPartitionExtendHashTable);
using BucketArray = common::ObSegmentArray<Item*, OB_MALLOC_BIG_BLOCK_SIZE, common::ModulePageAllocator>;
int extend(const int64_t new_bucket_num);
static int64_t estimate_bucket_num(const int64_t bucket_num, const int64_t max_hash_mem);
int create_bucket_array(const int64_t bucket_num, BucketArray*& new_buckets);
private:
private:
int64_t size_;
int64_t bucket_num_;
BucketArray* buckets_;
@ -222,7 +222,7 @@ class ObPartitionExtendHashTable {
template <typename HashCol, typename HashRowStore>
class ObBasicHashPartInfrastructure {
public:
public:
ObBasicHashPartInfrastructure()
: tenant_id_(UINT64_MAX),
mem_context_(nullptr),
@ -263,14 +263,14 @@ class ObBasicHashPartInfrastructure {
{}
~ObBasicHashPartInfrastructure();
public:
public:
enum InputWays { ONE = 1, TWO = 2 };
enum ProcessMode {
Cache = 0,
PreProcess = 1,
};
public:
public:
struct ObIntraPartKey {
ObIntraPartKey() : nth_way_(0), level_(0), nth_part_(0)
{}
@ -309,7 +309,7 @@ class ObBasicHashPartInfrastructure {
};
};
class ObIntraPartition : public common::ObDLinkBase<ObIntraPartition> {
public:
public:
ObIntraPartition() : part_key_(), store_()
{}
~ObIntraPartition()
@ -317,17 +317,17 @@ class ObBasicHashPartInfrastructure {
store_.reset();
}
public:
public:
int init();
TO_STRING_KV(K_(part_key));
public:
public:
ObIntraPartKey part_key_;
ObChunkRowStore store_;
};
private:
private:
bool is_left() const
{
return InputSide::LEFT == cur_side_;
@ -387,7 +387,7 @@ class ObBasicHashPartInfrastructure {
int update_mem_status_periodically();
public:
public:
int init(uint64_t tenant_id, bool enable_sql_dumped, bool unique, bool need_pre_part, int64_t ways,
ObSqlMemMgrProcessor* sql_mem_processor);
@ -483,7 +483,7 @@ class ObBasicHashPartInfrastructure {
int calc_hash_value(const common::ObNewRow* row, uint64_t& hash_value);
private:
private:
static const int64_t BLOCK_SIZE = 64 * 1024;
static const int64_t MIN_BUCKET_NUM = 128;
static const int64_t MAX_BUCKET_NUM = 131072; // 1M = 131072 * 8

View File

@ -70,7 +70,7 @@ struct ObTempHashPartCols : public ObHashPartCols {
template <typename Item>
class ObHashPartitionExtendHashTable {
public:
public:
const static int64_t INITIAL_SIZE = 128;
const static int64_t SIZE_BUCKET_PERCENT = 80;
const static int64_t MAX_MEM_PERCENT = 40;
@ -176,7 +176,7 @@ class ObHashPartitionExtendHashTable {
sql_mem_processor_ = sql_mem_processor;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObHashPartitionExtendHashTable);
using BucketArray = common::ObSegmentArray<Item*, OB_MALLOC_BIG_BLOCK_SIZE, common::ModulePageAllocator>;
int extend(const int64_t new_bucket_num);
@ -184,7 +184,7 @@ class ObHashPartitionExtendHashTable {
const int64_t bucket_num, const int64_t max_hash_mem, const int64_t min_bucket, const int64_t max_bucket);
int create_bucket_array(const int64_t bucket_num, BucketArray*& new_buckets);
private:
private:
int64_t size_;
int64_t bucket_num_;
int64_t min_bucket_num_;
@ -200,7 +200,7 @@ class ObHashPartitionExtendHashTable {
template <typename HashCol, typename HashRowStore>
class ObHashPartInfrastructure {
public:
public:
ObHashPartInfrastructure()
: tenant_id_(UINT64_MAX),
mem_context_(nullptr),
@ -245,14 +245,14 @@ class ObHashPartInfrastructure {
{}
~ObHashPartInfrastructure();
public:
public:
enum InputWays { ONE = 1, TWO = 2 };
enum ProcessMode {
Cache = 0,
PreProcess = 1,
};
public:
public:
struct ObIntraPartKey {
ObIntraPartKey() : nth_way_(0), level_(0), nth_part_(0)
{}
@ -291,7 +291,7 @@ class ObHashPartInfrastructure {
};
};
class ObIntraPartition : public common::ObDLinkBase<ObIntraPartition> {
public:
public:
ObIntraPartition() : part_key_(), store_()
{}
~ObIntraPartition()
@ -299,17 +299,17 @@ class ObHashPartInfrastructure {
store_.reset();
}
public:
public:
int init();
TO_STRING_KV(K_(part_key));
public:
public:
ObIntraPartKey part_key_;
ObChunkDatumStore store_;
};
private:
private:
bool is_left() const
{
return InputSide::LEFT == cur_side_;
@ -368,7 +368,7 @@ class ObHashPartInfrastructure {
int update_mem_status_periodically();
public:
public:
int init(uint64_t tenant_id, bool enable_sql_dumped, bool unique, bool need_pre_part, int64_t ways,
ObSqlMemMgrProcessor* sql_mem_processor);
@ -486,7 +486,7 @@ class ObHashPartInfrastructure {
return ret;
}
private:
private:
static const int64_t BLOCK_SIZE = 64 * 1024;
static const int64_t MIN_BUCKET_NUM = 128;
static const int64_t MAX_BUCKET_NUM = 131072; // 1M = 131072 * 8

View File

@ -24,7 +24,7 @@ namespace sql {
// REGISTER_PHY_OPERATOR(ObLimit, PHY_LIMIT);
class ObLimit::ObLimitCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObLimitCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx),
limit_(-1),
@ -40,7 +40,7 @@ class ObLimit::ObLimitCtx : public ObPhyOperatorCtx {
ObPhyOperatorCtx::destroy_base();
}
private:
private:
int64_t limit_;
int64_t offset_;
int64_t input_count_;

View File

@ -23,10 +23,10 @@ class ObSqlExpression;
class ObLimit : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
private:
private:
class ObLimitCtx;
public:
public:
explicit ObLimit(common::ObIAllocator& alloc);
virtual ~ObLimit();
@ -56,7 +56,7 @@ class ObLimit : public ObSingleChildPhyOperator {
}
int convert_limit_percent(ObExecContext& ctx, ObLimitCtx* limit_ctx) const;
private:
private:
bool is_valid() const;
int get_int_value(ObExecContext& ctx, const ObSqlExpression* in_val, int64_t& out_val, bool& is_null_value) const;
int get_double_value(ObExecContext& ctx, const ObSqlExpression* double_val, double& out_val) const;
@ -96,7 +96,7 @@ class ObLimit : public ObSingleChildPhyOperator {
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObLimit);
private:
private:
// data members
ObSqlExpression* org_limit_;
ObSqlExpression* org_offset_;

View File

@ -22,7 +22,7 @@ namespace sql {
class ObLimitSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObLimitSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type);
INHERIT_TO_STRING_KV("op_spec", ObOpSpec, K_(limit_expr), K_(offset_expr), K_(percent_expr), K_(calc_found_rows),
@ -40,7 +40,7 @@ class ObLimitSpec : public ObOpSpec {
};
class ObLimitOp : public ObOperator {
public:
public:
ObLimitOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
@ -56,11 +56,11 @@ class ObLimitOp : public ObOperator {
static int get_int_val(ObExpr* expr, ObEvalCtx& eval_ctx, int64_t& val, bool& is_null_value);
static int get_double_val(ObExpr* expr, ObEvalCtx& eval_ctx, double& val);
private:
private:
int convert_limit_percent();
int is_row_order_by_item_value_equal(bool& is_equal);
private:
private:
int64_t limit_;
int64_t offset_;
int64_t input_cnt_;

View File

@ -30,7 +30,7 @@ namespace sql {
class ObMaterialInput : public ObIPhyOperatorInput {
OB_UNIS_VERSION_V(1);
public:
public:
ObMaterialInput() : bypass_(false)
{}
virtual ~ObMaterialInput() = default;
@ -49,7 +49,7 @@ class ObMaterialInput : public ObIPhyOperatorInput {
return bypass_;
}
protected:
protected:
bool bypass_;
};
@ -57,7 +57,7 @@ class ObExecContext;
class ObMaterial : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
public:
public:
explicit ObMaterial(common::ObIAllocator& alloc) : ObSingleChildPhyOperator(alloc)
{}
virtual ~ObMaterial()
@ -68,11 +68,11 @@ class ObMaterial : public ObSingleChildPhyOperator {
int get_material_row_count(ObExecContext& exec_ctx, int64_t& row_count) const;
private:
private:
class ObMaterialCtx : public ObPhyOperatorCtx {
friend class ObMaterial;
public:
public:
explicit ObMaterialCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx),
mem_context_(nullptr),
@ -103,7 +103,7 @@ class ObMaterial : public ObSingleChildPhyOperator {
return sql_mem_processor_.get_data_size() > sql_mem_processor_.get_mem_bound();
}
private:
private:
lib::MemoryContext* mem_context_;
ObChunkRowStore row_store_;
ObChunkRowStore::Iterator row_store_it_;
@ -114,7 +114,7 @@ class ObMaterial : public ObSingleChildPhyOperator {
bool is_first_;
};
private:
private:
virtual int inner_get_next_row(ObExecContext& exec_ctx, const common::ObNewRow*& row) const;
/**
* @brief open operator, not including children operators.
@ -132,9 +132,9 @@ class ObMaterial : public ObSingleChildPhyOperator {
int get_all_row_from_child(ObMaterialCtx& mat_ctx, ObSQLSessionInfo& session) const;
int process_dump(ObMaterialCtx& mat_ctx) const;
private:
private:
// no data member
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObMaterial);
};

View File

@ -23,13 +23,13 @@ namespace sql {
class ObMaterialSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObMaterialSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type) : ObOpSpec(alloc, type)
{}
};
class ObMaterialOp : public ObOperator {
public:
public:
ObMaterialOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input)
: ObOperator(exec_ctx, spec, input),
mem_context_(nullptr),
@ -52,7 +52,7 @@ class ObMaterialOp : public ObOperator {
return common::OB_SUCCESS;
}
private:
private:
int process_dump();
int get_all_row_from_child(ObSQLSessionInfo& session);
@ -68,7 +68,7 @@ class ObMaterialOp : public ObOperator {
}
}
private:
private:
lib::MemoryContext* mem_context_;
ObChunkDatumStore datum_store_;
ObChunkDatumStore::Iterator datum_store_it_;

View File

@ -22,7 +22,7 @@ namespace sql {
OB_SERIALIZE_MEMBER((ObMonitoringDump, ObSingleChildPhyOperator), flags_, dst_op_id_);
class ObMonitoringDump::ObMonitoringDumpCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObMonitoringDumpCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx),
op_name_(),
@ -47,7 +47,7 @@ class ObMonitoringDump::ObMonitoringDumpCtx : public ObPhyOperatorCtx {
uint64_t last_row_time_;
bool first_row_fetched_;
private:
private:
friend class ObMonitoringDump;
};

View File

@ -25,7 +25,7 @@ class ObMonitoringDump : public ObSingleChildPhyOperator {
OB_UNIS_VERSION(1);
class ObMonitoringDumpCtx;
public:
public:
explicit ObMonitoringDump(common::ObIAllocator& alloc) : ObSingleChildPhyOperator(alloc), flags_(0), dst_op_id_(-1)
{}
virtual ~ObMonitoringDump() = default;
@ -39,7 +39,7 @@ class ObMonitoringDump : public ObSingleChildPhyOperator {
dst_op_id_ = dst_op_id;
}
private:
private:
/**
* @brief init operator context, will create a physical operator context (and a current row space)
* @param ctx[in], execute context
@ -66,7 +66,7 @@ class ObMonitoringDump : public ObSingleChildPhyOperator {
virtual int64_t to_string_kv(char* buf, const int64_t buf_len) const;
private:
private:
uint64_t flags_;
uint64_t dst_op_id_;
DISALLOW_COPY_AND_ASSIGN(ObMonitoringDump);

View File

@ -22,7 +22,7 @@ namespace sql {
class ObMonitoringDumpSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObMonitoringDumpSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type);
INHERIT_TO_STRING_KV("op_spec", ObOpSpec, K_(flags), K_(dst_op_id));
@ -32,7 +32,7 @@ class ObMonitoringDumpSpec : public ObOpSpec {
};
class ObMonitoringDumpOp : public ObOperator {
public:
public:
ObMonitoringDumpOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
@ -44,7 +44,7 @@ class ObMonitoringDumpOp : public ObOperator {
ObOperator::destroy();
}
private:
private:
common::ObDatum op_name_;
common::ObDatum tracefile_identifier_;
uint64_t open_time_;

View File

@ -45,7 +45,7 @@ enum FilterExecutorType {
};
class ObPushdownFilterUtils {
public:
public:
static bool is_pushdown_storage(int32_t pd_storage_flag)
{
return pd_storage_flag & 0x01;
@ -59,7 +59,7 @@ class ObPushdownFilterUtils {
class ObPushdownFilterNode {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownFilterNode(common::ObIAllocator& alloc)
: alloc_(alloc), type_(PushdownFilterType::MAX_FILTER_TYPE), n_child_(0), childs_(nullptr), col_ids_(alloc)
{}
@ -88,7 +88,7 @@ class ObPushdownFilterNode {
}
TO_STRING_KV(K_(type), K_(n_child), K_(col_ids));
public:
public:
common::ObIAllocator& alloc_;
PushdownFilterType type_;
uint32_t n_child_;
@ -99,7 +99,7 @@ class ObPushdownFilterNode {
class ObPushdownAndFilterNode : public ObPushdownFilterNode {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownAndFilterNode(common::ObIAllocator& alloc) : ObPushdownFilterNode(alloc)
{}
};
@ -107,7 +107,7 @@ class ObPushdownAndFilterNode : public ObPushdownFilterNode {
class ObPushdownOrFilterNode : public ObPushdownFilterNode {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownOrFilterNode(common::ObIAllocator& alloc) : ObPushdownFilterNode(alloc)
{}
};
@ -115,7 +115,7 @@ class ObPushdownOrFilterNode : public ObPushdownFilterNode {
class ObPushdownBlackFilterNode : public ObPushdownFilterNode {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownBlackFilterNode(common::ObIAllocator& alloc)
: ObPushdownFilterNode(alloc), column_exprs_(alloc), filter_exprs_(alloc), tmp_expr_(nullptr)
{}
@ -126,7 +126,7 @@ class ObPushdownBlackFilterNode : public ObPushdownFilterNode {
virtual int postprocess() override;
OB_INLINE void clear_evaluated_datums();
public:
public:
ExprFixedArray column_exprs_;
ExprFixedArray filter_exprs_;
ObExpr* tmp_expr_;
@ -135,7 +135,7 @@ class ObPushdownBlackFilterNode : public ObPushdownFilterNode {
class ObPushdownWhiteFilterNode : public ObPushdownFilterNode {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownWhiteFilterNode(common::ObIAllocator& alloc) : ObPushdownFilterNode(alloc)
{}
~ObPushdownWhiteFilterNode()
@ -145,14 +145,14 @@ class ObPushdownWhiteFilterNode : public ObPushdownFilterNode {
class ObPushdownFilterExecutor;
class ObPushdownFilterNode;
class ObPushdownFilterFactory {
public:
public:
ObPushdownFilterFactory(common::ObIAllocator* alloc) : alloc_(alloc)
{}
int alloc(PushdownFilterType type, uint32_t n_child, ObPushdownFilterNode*& pd_filter);
int alloc(FilterExecutorType type, uint32_t n_child, ObPushdownFilterNode& filter_node,
ObPushdownFilterExecutor*& filter_executor);
private:
private:
// pushdown filter
typedef int (*PDFilterAllocFunc)(common::ObIAllocator& alloc, uint32_t n_child, ObPushdownFilterNode*& filter_node);
template <typename ClassT, PushdownFilterType type>
@ -167,19 +167,19 @@ class ObPushdownFilterFactory {
ObPushdownFilterExecutor*& filter_executor);
static FilterExecutorAllocFunc FILTER_EXECUTOR_ALLOC[FilterExecutorType::MAX_EXECUTOR_TYPE];
private:
private:
common::ObIAllocator* alloc_;
};
class ObPushdownFilterConstructor {
public:
public:
ObPushdownFilterConstructor(common::ObIAllocator* alloc, ObStaticEngineCG& static_cg)
: alloc_(alloc), factory_(alloc), static_cg_(static_cg)
{}
int apply(ObRawExpr* raw_expr, ObPushdownFilterNode*& filter_tree);
int apply(common::ObIArray<ObRawExpr*>& exprs, ObPushdownFilterNode*& filter_tree);
private:
private:
int merge_filter_node(ObPushdownFilterNode* dst, ObPushdownFilterNode* other,
common::ObIArray<ObPushdownFilterNode*>& merged_node, bool& merged);
int deduplicate_filter_node(common::ObIArray<ObPushdownFilterNode*>& filter_nodes, uint32_t& n_node);
@ -195,7 +195,7 @@ class ObPushdownFilterConstructor {
return false;
}
private:
private:
common::ObIAllocator* alloc_;
ObPushdownFilterFactory factory_;
ObStaticEngineCG& static_cg_;
@ -205,7 +205,7 @@ class ObPushdownFilterConstructor {
class ObPushdownFilter {
OB_UNIS_VERSION_V(1);
public:
public:
ObPushdownFilter(common::ObIAllocator& alloc) : alloc_(alloc), filter_tree_(nullptr)
{}
@ -227,14 +227,14 @@ class ObPushdownFilter {
int64_t& pos, ObPushdownFilterNode*& pd_storage_filter);
static int64_t get_serialize_pushdown_filter_size(ObPushdownFilterNode* pd_filter_node);
// NEED_SERIALIZE_AND_DESERIALIZE;
private:
private:
common::ObIAllocator& alloc_;
ObPushdownFilterNode* filter_tree_;
};
// executor interface
class ObPushdownFilterExecutor {
public:
public:
ObPushdownFilterExecutor(common::ObIAllocator& alloc, ObPushdownFilterNode& filter)
: type_(FilterExecutorType::MAX_EXECUTOR_TYPE),
filter_(filter),
@ -379,13 +379,13 @@ class ObPushdownFilterExecutor {
VIRTUAL_TO_STRING_KV(K_(type), K_(n_cols), "col_offsets", common::ObArrayWrap<int32_t>(col_offsets_, n_cols_),
K_(n_child), KP_(childs), KP_(filter_bitmap), KP_(col_params));
protected:
protected:
int find_evaluated_datums(
ObExpr* expr, const common::ObIArray<ObExpr*>& calc_exprs, common::ObIArray<ObExpr*>& eval_exprs);
int find_evaluated_datums(common::ObIArray<ObExpr*>& src_exprs, const common::ObIArray<ObExpr*>& calc_exprs,
common::ObIArray<ObExpr*>& eval_exprs);
protected:
protected:
FilterExecutorType type_;
ObPushdownFilterNode& filter_;
int64_t n_cols_;
@ -398,7 +398,7 @@ class ObPushdownFilterExecutor {
};
class ObBlackFilterExecutor : public ObPushdownFilterExecutor {
public:
public:
ObBlackFilterExecutor(common::ObIAllocator& alloc, ObPushdownBlackFilterNode& filter)
: ObPushdownFilterExecutor(alloc, filter), n_eval_infos_(0), eval_infos_(nullptr), eval_ctx_(nullptr)
{}
@ -413,7 +413,7 @@ class ObBlackFilterExecutor : public ObPushdownFilterExecutor {
INHERIT_TO_STRING_KV("ObPushdownBlackFilterExecutor", ObPushdownFilterExecutor, K_(filter), K_(n_eval_infos),
K_(n_cols), "col_offsets", common::ObArrayWrap<int32_t>(col_offsets_, n_cols_), KP_(eval_infos), KP_(eval_ctx));
private:
private:
int32_t n_eval_infos_;
ObEvalInfo** eval_infos_;
ObEvalCtx* eval_ctx_;
@ -427,7 +427,7 @@ OB_INLINE void ObBlackFilterExecutor::clear_evaluated_datums()
}
class ObWhiteFilterExecutor : public ObPushdownFilterExecutor {
public:
public:
ObWhiteFilterExecutor(common::ObIAllocator& alloc, ObPushdownWhiteFilterNode& filter)
: ObPushdownFilterExecutor(alloc, filter)
{}
@ -439,11 +439,11 @@ class ObWhiteFilterExecutor : public ObPushdownFilterExecutor {
common::ObIAllocator& alloc, const common::ObIArray<ObExpr*>& calc_exprs, ObEvalCtx* eval_ctx) override;
INHERIT_TO_STRING_KV("ObPushdownFilterExecutor", ObPushdownFilterExecutor, K_(filter));
private:
private:
};
class ObAndFilterExecutor : public ObPushdownFilterExecutor {
public:
public:
ObAndFilterExecutor(common::ObIAllocator& alloc, ObPushdownAndFilterNode& filter)
: ObPushdownFilterExecutor(alloc, filter)
{}
@ -452,11 +452,11 @@ class ObAndFilterExecutor : public ObPushdownFilterExecutor {
common::ObIAllocator& alloc, const common::ObIArray<ObExpr*>& calc_exprs, ObEvalCtx* eval_ctx) override;
INHERIT_TO_STRING_KV("ObPushdownFilterExecutor", ObPushdownFilterExecutor, K_(filter));
private:
private:
};
class ObOrFilterExecutor : public ObPushdownFilterExecutor {
public:
public:
ObOrFilterExecutor(common::ObIAllocator& alloc, ObPushdownOrFilterNode& filter)
: ObPushdownFilterExecutor(alloc, filter)
{}
@ -466,20 +466,20 @@ class ObOrFilterExecutor : public ObPushdownFilterExecutor {
common::ObIAllocator& alloc, const common::ObIArray<ObExpr*>& calc_exprs, ObEvalCtx* eval_ctx) override;
INHERIT_TO_STRING_KV("ObPushdownFilterExecutor", ObPushdownFilterExecutor, K_(filter));
private:
private:
};
class ObFilterExecutorConstructor {
public:
public:
ObFilterExecutorConstructor(common::ObIAllocator* alloc) : alloc_(alloc), factory_(alloc)
{}
int apply(ObPushdownFilterNode* filter_tree, ObPushdownFilterExecutor*& filter_executor);
private:
private:
template <typename CLASST, FilterExecutorType type>
int create_filter_executor(ObPushdownFilterNode* filter_tree, ObPushdownFilterExecutor*& filter_executor);
private:
private:
common::ObIAllocator* alloc_;
ObPushdownFilterFactory factory_;
};

View File

@ -28,9 +28,9 @@ namespace sql {
// Random access row store, support disk store.
// All row must have same cell count and projector.
class ObRADatumStore {
public:
public:
class ShrinkBuffer {
public:
public:
ShrinkBuffer() : data_(NULL), head_(0), tail_(0), cap_(0)
{}
@ -83,7 +83,7 @@ class ObRADatumStore {
TO_STRING_KV(KP_(data), K_(head), K_(tail), K_(cap));
private:
private:
char* data_;
int64_t head_;
int64_t tail_;
@ -285,7 +285,7 @@ class ObRADatumStore {
class Reader {
friend class ObRADatumStore;
public:
public:
explicit Reader(ObRADatumStore& store) : store_(store), file_size_(0), idx_blk_(NULL), ib_pos_(0), blk_(NULL)
{}
virtual ~Reader()
@ -303,10 +303,10 @@ class ObRADatumStore {
void reset();
void reuse();
private:
private:
void reset_cursor(const int64_t file_size);
private:
private:
ObRADatumStore& store_;
// idx_blk_, blk_ may point to the writing block,
// we need to invalid the pointers if file_size_ change.
@ -321,7 +321,7 @@ class ObRADatumStore {
DISALLOW_COPY_AND_ASSIGN(Reader);
};
public:
public:
const static int64_t BLOCK_SIZE = (64L << 10) - sizeof(LinkNode);
const static int64_t BIG_BLOCK_SIZE = (256L << 10) - sizeof(LinkNode);
// alloc first index block after store 1MB data.
@ -389,7 +389,7 @@ class ObRADatumStore {
TO_STRING_KV(
K_(tenant_id), K_(label), K_(ctx_id), K_(mem_limit), K_(save_row_cnt), K_(row_cnt), K_(fd), K_(file_size));
private:
private:
static int get_timeout(int64_t& timeout_ms);
void* alloc_blk_mem(const int64_t size);
void free_blk_mem(void* mem, const int64_t size = 0);
@ -415,7 +415,7 @@ class ObRADatumStore {
bool need_dump();
private:
private:
bool inited_;
uint64_t tenant_id_;
const char* label_;

View File

@ -26,9 +26,9 @@ namespace sql {
// Random access row store, support disk store.
// All row must have same cell count and projector.
class ObRARowStore {
public:
public:
class ShrinkBuffer {
public:
public:
ShrinkBuffer() : data_(NULL), head_(0), tail_(0), cap_(0)
{}
@ -81,7 +81,7 @@ class ObRARowStore {
TO_STRING_KV(KP_(data), K_(head), K_(tail), K_(cap));
private:
private:
char* data_;
int64_t head_;
int64_t tail_;
@ -224,7 +224,7 @@ class ObRARowStore {
class Reader {
friend class ObRARowStore;
public:
public:
explicit Reader(ObRARowStore& store) : store_(store), file_size_(0), idx_blk_(NULL), ib_pos_(0), blk_(NULL)
{}
virtual ~Reader()
@ -244,10 +244,10 @@ class ObRARowStore {
void reset();
void reuse();
private:
private:
void reset_cursor(const int64_t file_size);
private:
private:
ObRARowStore& store_;
// idx_blk_, blk_ may point to the writing block,
// we need to invalid the pointers if file_size_ change.
@ -263,7 +263,7 @@ class ObRARowStore {
DISALLOW_COPY_AND_ASSIGN(Reader);
};
public:
public:
const static int64_t BLOCK_SIZE = (64L << 10) - sizeof(LinkNode);
const static int64_t BIG_BLOCK_SIZE = (256L << 10) - sizeof(LinkNode);
// alloc first index block after store 1MB data.
@ -333,7 +333,7 @@ class ObRARowStore {
TO_STRING_KV(
K_(tenant_id), K_(label), K_(ctx_id), K_(mem_limit), K_(save_row_cnt), K_(row_cnt), K_(fd), K_(file_size));
private:
private:
static int get_timeout(int64_t& timeout_ms);
void* alloc_blk_mem(const int64_t size);
void free_blk_mem(void* mem, const int64_t size = 0);
@ -359,7 +359,7 @@ class ObRARowStore {
bool need_dump();
private:
private:
bool inited_;
uint64_t tenant_id_;
const char* label_;

View File

@ -26,7 +26,7 @@ namespace sql {
class ObSelectInto::ObSelectIntoCtx : public ObPhyOperatorCtx {
friend class ObSelectInto;
public:
public:
explicit ObSelectIntoCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx), top_limit_cnt_(INT64_MAX), file_appender_(), is_first_(true)
{}
@ -45,7 +45,7 @@ class ObSelectInto::ObSelectIntoCtx : public ObPhyOperatorCtx {
file_appender_.close();
}
private:
private:
int64_t top_limit_cnt_;
ObFileAppender file_appender_;
bool is_first_;

View File

@ -24,10 +24,10 @@ namespace sql {
class ObSelectInto : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
private:
private:
class ObSelectIntoCtx;
public:
public:
explicit ObSelectInto(common::ObIAllocator& alloc);
virtual ~ObSelectInto();
virtual void reset();
@ -56,7 +56,7 @@ class ObSelectInto : public ObSingleChildPhyOperator {
closed_cht_ = closed_cht;
}
private:
private:
/**
* @brief init operator context, will create a physical operator context (and a current row space)
* @param ctx[in], execute context
@ -91,7 +91,7 @@ class ObSelectInto : public ObSingleChildPhyOperator {
ObSelectIntoCtx& into_ctx) const;
DISALLOW_COPY_AND_ASSIGN(ObSelectInto);
private:
private:
ObItemType into_type_;
common::ObSEArray<common::ObString, 16> user_vars_;
common::ObObj outfile_name_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObSqlMemoryCallback {
public:
public:
virtual void alloc(int64_t size) = 0;
virtual void free(int64_t size) = 0;
virtual void dumped(int64_t size) = 0;

View File

@ -32,7 +32,7 @@ class ObTempTableAccessInput : public ObIPhyOperatorInput {
friend class ObTempTableAccess;
OB_UNIS_VERSION_V(1);
public:
public:
ObTempTableAccessInput();
virtual ~ObTempTableAccessInput();
virtual void reset() override;
@ -43,11 +43,11 @@ class ObTempTableAccessInput : public ObIPhyOperatorInput {
int check_closed_finish(bool& is_end);
int assign_ids(common::ObIArray<uint64_t>& interm_res_ids);
protected:
protected:
common::ObIAllocator* deserialize_allocator_;
DISALLOW_COPY_AND_ASSIGN(ObTempTableAccessInput);
public:
public:
uint64_t closed_count_;
uint64_t unfinished_count_ptr_;
common::ObSEArray<uint64_t, 8> interm_result_ids_;
@ -56,11 +56,11 @@ class ObTempTableAccessInput : public ObIPhyOperatorInput {
class ObTempTableAccess : public ObNoChildrenPhyOperator {
OB_UNIS_VERSION_V(1);
protected:
protected:
class ObTempTableAccessCtx : public ObPhyOperatorCtx {
friend class ObTempTableAccess;
public:
public:
explicit ObTempTableAccessCtx(ObExecContext& ctx)
: ObPhyOperatorCtx(ctx), row_store_(NULL), tta_input_(NULL), is_started_(false)
{}
@ -72,14 +72,14 @@ class ObTempTableAccess : public ObNoChildrenPhyOperator {
}
int locate_interm_result(dtl::ObDTLIntermResultKey& dtl_int_key);
private:
private:
ObChunkRowStore* row_store_;
ObChunkRowStore::Iterator row_store_it_;
ObTempTableAccessInput* tta_input_;
bool is_started_;
};
public:
public:
ObTempTableAccess(common::ObIAllocator& alloc)
: ObNoChildrenPhyOperator(alloc),
output_indexs_(alloc),
@ -138,7 +138,7 @@ class ObTempTableAccess : public ObNoChildrenPhyOperator {
DISALLOW_COPY_AND_ASSIGN(ObTempTableAccess);
private:
private:
common::ObFixedArray<int64_t, common::ObIAllocator> output_indexs_;
uint64_t temp_table_id_;
bool is_distributed_;

View File

@ -33,7 +33,7 @@ class ObTempTableAccessOpInput : public ObOpInput {
OB_UNIS_VERSION_V(1);
friend class ObTempTableAccessOp;
public:
public:
ObTempTableAccessOpInput(ObExecContext& ctx, const ObOpSpec& spec);
virtual ~ObTempTableAccessOpInput();
virtual void reset() override;
@ -44,21 +44,21 @@ class ObTempTableAccessOpInput : public ObOpInput {
int check_finish(bool& is_end, int64_t& interm_res_ids);
int check_closed_finish(bool& is_end);
protected:
protected:
common::ObIAllocator* deserialize_allocator_;
DISALLOW_COPY_AND_ASSIGN(ObTempTableAccessOpInput);
public:
public:
uint64_t closed_count_;
uint64_t unfinished_count_ptr_;
common::ObSEArray<uint64_t, 8> interm_result_ids_;
};
class ObTempTableAccessOpSpec : public ObOpSpec {
public:
public:
OB_UNIS_VERSION_V(1);
public:
public:
ObTempTableAccessOpSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type)
: ObOpSpec(alloc, type),
output_indexs_(alloc),
@ -112,7 +112,7 @@ class ObTempTableAccessOpSpec : public ObOpSpec {
DECLARE_VIRTUAL_TO_STRING;
public:
public:
common::ObFixedArray<int64_t, common::ObIAllocator> output_indexs_;
uint64_t temp_table_id_;
bool is_distributed_;
@ -122,7 +122,7 @@ class ObTempTableAccessOpSpec : public ObOpSpec {
};
class ObTempTableAccessOp : public ObOperator {
public:
public:
ObTempTableAccessOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input)
: ObOperator(exec_ctx, spec, input), datum_store_(NULL), datum_store_it_(), is_started_(false)
{}
@ -139,7 +139,7 @@ class ObTempTableAccessOp : public ObOperator {
int locate_interm_result(dtl::ObDTLIntermResultKey& dtl_int_key);
int destory_interm_results();
private:
private:
ObChunkDatumStore* datum_store_;
ObChunkDatumStore::Iterator datum_store_it_;
bool is_started_;

View File

@ -30,7 +30,7 @@ class ObTempTableInsertInput : public ObIPhyOperatorInput {
friend class ObTempTableInsert;
OB_UNIS_VERSION_V(1);
public:
public:
ObTempTableInsertInput();
virtual ~ObTempTableInsertInput();
virtual void reset() override;
@ -39,11 +39,11 @@ class ObTempTableInsertInput : public ObIPhyOperatorInput {
virtual int init(ObExecContext& ctx, ObTaskInfo& task_info, const ObPhyOperator& op);
int assign_ids(common::ObIArray<uint64_t>& interm_res_ids);
protected:
protected:
common::ObIAllocator* deserialize_allocator_;
DISALLOW_COPY_AND_ASSIGN(ObTempTableInsertInput);
public:
public:
uint64_t unfinished_count_ptr_;
common::ObSEArray<uint64_t, 8> interm_result_ids_;
};
@ -51,11 +51,11 @@ class ObTempTableInsertInput : public ObIPhyOperatorInput {
class ObTempTableInsert : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
protected:
protected:
class ObTempTableInsertCtx : public ObPhyOperatorCtx {
friend class ObTempTableInsert;
public:
public:
explicit ObTempTableInsertCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx), interm_result_id_(0)
{}
virtual ~ObTempTableInsertCtx()
@ -69,11 +69,11 @@ class ObTempTableInsert : public ObSingleChildPhyOperator {
interm_result_id_ = id;
}
public:
public:
uint64_t interm_result_id_;
};
public:
public:
ObTempTableInsert(common::ObIAllocator& alloc)
: ObSingleChildPhyOperator(alloc), temp_table_id_(0), is_distributed_(false)
{}
@ -110,7 +110,7 @@ class ObTempTableInsert : public ObSingleChildPhyOperator {
DISALLOW_COPY_AND_ASSIGN(ObTempTableInsert);
private:
private:
uint64_t temp_table_id_;
bool is_distributed_;
};

View File

@ -33,7 +33,7 @@ class ObTempTableInsertOpInput : public ObOpInput {
OB_UNIS_VERSION_V(1);
friend class ObTempTableInsertOp;
public:
public:
ObTempTableInsertOpInput(ObExecContext& ctx, const ObOpSpec& spec);
virtual ~ObTempTableInsertOpInput();
virtual void reset() override;
@ -42,20 +42,20 @@ class ObTempTableInsertOpInput : public ObOpInput {
virtual int init(ObTaskInfo& task_info);
virtual int init(ObExecContext& ctx, ObTaskInfo& task_info, const ObPhyOperator& op);
protected:
protected:
common::ObIAllocator* deserialize_allocator_;
DISALLOW_COPY_AND_ASSIGN(ObTempTableInsertOpInput);
public:
public:
uint64_t unfinished_count_ptr_;
common::ObSEArray<uint64_t, 8> interm_result_ids_;
};
class ObTempTableInsertOpSpec : public ObOpSpec {
public:
public:
OB_UNIS_VERSION_V(1);
public:
public:
ObTempTableInsertOpSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type)
: ObOpSpec(alloc, type), temp_table_id_(0), is_distributed_(false)
{}
@ -80,13 +80,13 @@ class ObTempTableInsertOpSpec : public ObOpSpec {
DECLARE_VIRTUAL_TO_STRING;
public:
public:
uint64_t temp_table_id_;
bool is_distributed_;
};
class ObTempTableInsertOp : public ObOperator {
public:
public:
ObTempTableInsertOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input)
: ObOperator(exec_ctx, spec, input), interm_result_id_(0)
{}
@ -100,7 +100,7 @@ class ObTempTableInsertOp : public ObOperator {
virtual void destroy() override;
int prepare_scan_param();
private:
private:
uint64_t interm_result_id_;
};

View File

@ -24,11 +24,11 @@ namespace sql {
class ObTempTableTransformation : public ObMultiChildrenPhyOperator {
OB_UNIS_VERSION_V(1);
protected:
protected:
class ObTempTableTransformationCtx : public ObPhyOperatorCtx {
friend class ObTempTableTransformation;
public:
public:
explicit ObTempTableTransformationCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx)
{}
virtual ~ObTempTableTransformationCtx()
@ -39,7 +39,7 @@ class ObTempTableTransformation : public ObMultiChildrenPhyOperator {
}
};
public:
public:
explicit ObTempTableTransformation(common::ObIAllocator& alloc) : ObMultiChildrenPhyOperator(alloc)
{}
~ObTempTableTransformation()

View File

@ -29,10 +29,10 @@ namespace oceanbase {
namespace sql {
class ObExecContext;
class ObTempTableTransformationOpSpec : public ObOpSpec {
public:
public:
OB_UNIS_VERSION_V(1);
public:
public:
ObTempTableTransformationOpSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type) : ObOpSpec(alloc, type)
{}
virtual ~ObTempTableTransformationOpSpec()
@ -41,7 +41,7 @@ class ObTempTableTransformationOpSpec : public ObOpSpec {
};
class ObTempTableTransformationOp : public ObOperator {
public:
public:
ObTempTableTransformationOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input)
: ObOperator(exec_ctx, spec, input)
{}

View File

@ -26,7 +26,7 @@ using namespace common;
namespace sql {
class ObTopK::ObTopKCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObTopKCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx), topk_final_count_(-1), output_count_(0)
{}
virtual void destroy()
@ -34,7 +34,7 @@ class ObTopK::ObTopKCtx : public ObPhyOperatorCtx {
ObPhyOperatorCtx::destroy_base();
}
private:
private:
int64_t topk_final_count_; // count of rows that need to be output upforward
int64_t output_count_;
friend class ObTopK;

View File

@ -21,10 +21,10 @@ class ObSqlExpression;
class ObTopK : public ObSingleChildPhyOperator {
OB_UNIS_VERSION_V(1);
private:
private:
class ObTopKCtx;
public:
public:
explicit ObTopK(common::ObIAllocator& alloc);
virtual ~ObTopK();
@ -34,7 +34,7 @@ class ObTopK : public ObSingleChildPhyOperator {
ObSqlExpression* limit, ObSqlExpression* offset, int64_t minimum_row_count, int64_t topk_precision);
virtual int rescan(ObExecContext& ctx) const;
private:
private:
bool is_valid() const;
int get_int_value(ObExecContext& ctx, const ObSqlExpression* in_val, int64_t& out_val, bool& is_null_value) const;
/**
@ -72,7 +72,7 @@ class ObTopK : public ObSingleChildPhyOperator {
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObTopK);
private:
private:
// data members
int64_t minimum_row_count_;
int64_t topk_precision_;

View File

@ -21,7 +21,7 @@ namespace sql {
class ObTopKSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObTopKSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type);
bool is_valid() const;
@ -34,12 +34,12 @@ class ObTopKSpec : public ObOpSpec {
ObExpr* org_limit_;
ObExpr* org_offset_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObTopKSpec);
};
class ObTopKOp : public ObOperator {
public:
public:
ObTopKOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
@ -52,7 +52,7 @@ class ObTopKOp : public ObOperator {
ObOperator::destroy();
}
private:
private:
int get_topk_final_count();
DISALLOW_COPY_AND_ASSIGN(ObTopKOp);

View File

@ -19,7 +19,7 @@ namespace sql {
OB_SERIALIZE_MEMBER((ObValues, ObNoChildrenPhyOperator), row_store_);
class ObValues::ObValuesCtx : public ObPhyOperatorCtx {
public:
public:
explicit ObValuesCtx(ObExecContext& ctx) : ObPhyOperatorCtx(ctx), row_store_it_()
{}
virtual void destroy()
@ -27,7 +27,7 @@ class ObValues::ObValuesCtx : public ObPhyOperatorCtx {
ObPhyOperatorCtx::destroy_base();
}
private:
private:
ObRowStore::Iterator row_store_it_;
friend class ObValues;
};

View File

@ -22,7 +22,7 @@ class ObValues : public ObNoChildrenPhyOperator {
OB_UNIS_VERSION(1);
class ObValuesCtx;
public:
public:
explicit ObValues(common::ObIAllocator& alloc) : ObNoChildrenPhyOperator(alloc), row_store_(alloc)
{}
~ObValues()
@ -35,7 +35,7 @@ class ObValues : public ObNoChildrenPhyOperator {
int rescan(ObExecContext& ctx) const;
int set_row_store(const common::ObRowStore& row_store);
private:
private:
/**
* @brief init operator context, will create a physical operator context (and a current row space)
* @param ctx[in], execute context
@ -62,7 +62,7 @@ class ObValues : public ObNoChildrenPhyOperator {
virtual int64_t to_string_kv(char* buf, const int64_t buf_len) const;
DISALLOW_COPY_AND_ASSIGN(ObValues);
private:
private:
common::ObRowStore row_store_;
};
} // namespace sql

View File

@ -25,14 +25,14 @@ namespace sql {
class ObValuesSpec : public ObOpSpec {
OB_UNIS_VERSION_V(1);
public:
public:
ObValuesSpec(common::ObIAllocator& alloc, const ObPhyOperatorType type);
common::ObRowStore row_store_;
};
class ObValuesOp : public ObOperator {
public:
public:
ObValuesOp(ObExecContext& exec_ctx, const ObOpSpec& spec, ObOpInput* input);
virtual int inner_open() override;
@ -45,7 +45,7 @@ class ObValuesOp : public ObOperator {
ObOperator::destroy();
}
private:
private:
common::ObNewRow cur_row_;
common::ObRowStore::Iterator row_store_it_;
};