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

@ -23,7 +23,7 @@ namespace sql {
*/
class ObLogDelete;
class ObDeleteLogPlan : public ObLogPlan {
public:
public:
ObDeleteLogPlan(ObOptimizerContext& ctx, const ObDeleteStmt* delete_stmt)
: ObLogPlan(ctx, delete_stmt), delete_op_(NULL)
{}
@ -32,12 +32,12 @@ class ObDeleteLogPlan : public ObLogPlan {
int generate_raw_plan();
virtual int generate_plan();
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObDeleteLogPlan);
int allocate_delete_as_top(ObLogicalOperator*& top);
int allocate_pdml_delete_as_top(ObLogicalOperator*& top);
private:
private:
ObLogDelete* delete_op_;
};
} // namespace sql

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObExplainLogPlan : public ObLogPlan {
public:
public:
ObExplainLogPlan(ObOptimizerContext& ctx, const ObDMLStmt* explain_stmt) : ObLogPlan(ctx, explain_stmt)
{}
virtual ~ObExplainLogPlan()
@ -27,7 +27,7 @@ class ObExplainLogPlan : public ObLogPlan {
virtual int generate_plan();
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExplainLogPlan);
};
} // namespace sql

View File

@ -27,7 +27,7 @@ enum FdLevel { INVALID_LEVEL = -1, TABLE_LEVEL, EXPR_LEVEL };
* {t1} is child tables
*/
class ObFdItem {
public:
public:
ObFdItem(const bool is_unique = false, ObRawExprSet* parent_exprs = NULL, const int32_t stmt_level = -1)
: parent_exprs_(parent_exprs), is_unique_(is_unique), stmt_level_(stmt_level)
{}
@ -81,7 +81,7 @@ class ObFdItem {
VIRTUAL_TO_STRING_KV(K_(parent_exprs), K_(is_unique), K_(stmt_level));
protected:
protected:
ObRawExprSet* parent_exprs_;
bool is_unique_;
int32_t stmt_level_;
@ -90,7 +90,7 @@ class ObFdItem {
typedef common::ObSEArray<ObFdItem*, 8, common::ModulePageAllocator, true> ObFdItemSet;
class ObTableFdItem : public ObFdItem {
public:
public:
ObTableFdItem() : ObFdItem(), child_tables_()
{}
ObTableFdItem(const bool is_unique, ObRawExprSet* parent_exprs, const int32_t stmt_level)
@ -115,7 +115,7 @@ class ObTableFdItem : public ObFdItem {
VIRTUAL_TO_STRING_KV(K_(parent_exprs), K_(is_unique), K_(stmt_level), K_(child_tables));
protected:
protected:
ObRelIds child_tables_;
};
inline FdLevel ObTableFdItem::get_level() const
@ -128,7 +128,7 @@ inline bool ObTableFdItem::is_table_fd_item() const
}
class ObExprFdItem : public ObFdItem {
public:
public:
ObExprFdItem() : ObFdItem(), inner_alloc_("ExprFdItem"), child_exprs_(&inner_alloc_)
{}
ObExprFdItem(const bool is_unique, ObRawExprSet* parent_exprs, const int32_t stmt_level)
@ -153,7 +153,7 @@ class ObExprFdItem : public ObFdItem {
VIRTUAL_TO_STRING_KV(K_(parent_exprs), K_(is_unique), K_(stmt_level), K_(child_exprs));
protected:
protected:
common::ModulePageAllocator inner_alloc_;
ObRawExprSet child_exprs_;
};
@ -167,7 +167,7 @@ inline bool ObExprFdItem::is_expr_fd_item() const
}
class ObFdItemFactory {
public:
public:
explicit ObFdItemFactory(common::ObIAllocator& alloc) : allocator_(alloc), item_store_(alloc), item_set_store_(alloc)
{}
~ObFdItemFactory()
@ -209,13 +209,13 @@ class ObFdItemFactory {
}
TO_STRING_KV("", "");
private:
private:
common::ObIAllocator& allocator_;
common::ObObjStore<ObFdItem*, common::ObIAllocator&, true> item_store_;
common::ObObjStore<ObFdItemSet*, common::ObIAllocator&, true> item_set_store_;
ObRawExprSets parent_sets_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObFdItemFactory);
};

View File

@ -20,7 +20,7 @@ namespace oceanbase {
namespace sql {
class QueryRangeInfo {
public:
public:
QueryRangeInfo()
: is_valid_(false),
contain_always_false_(false),
@ -125,7 +125,7 @@ class QueryRangeInfo {
TO_STRING_KV(K_(is_valid), K_(contain_always_false), K_(range_columns), K_(equal_prefix_count),
K_(equal_prefix_null_count), K_(range_prefix_count), K_(index_column_count));
private:
private:
bool is_valid_;
bool contain_always_false_;
ObQueryRange* query_range_;
@ -139,7 +139,7 @@ class QueryRangeInfo {
};
class OrderingInfo {
public:
public:
OrderingInfo() : scan_direction_(default_asc_direction()), index_keys_(), ordering_()
{}
ObOrderDirection get_scan_direction() const
@ -169,7 +169,7 @@ class OrderingInfo {
}
TO_STRING_KV(K_(scan_direction), K_(index_keys));
private:
private:
ObOrderDirection scan_direction_;
common::ObArray<ObRawExpr*> index_keys_;
common::ObArray<ObRawExpr*> ordering_;
@ -177,7 +177,7 @@ class OrderingInfo {
};
class IndexInfoEntry {
public:
public:
IndexInfoEntry()
: index_id_(common::OB_INVALID_ID),
is_unique_index_(false),
@ -263,7 +263,7 @@ class IndexInfoEntry {
TO_STRING_KV(K_(index_id), K_(is_unique_index), K_(is_index_back), K_(is_index_global), K_(range_info),
K_(ordering_info), K_(interesting_order_info), K_(interesting_order_prefix_count));
private:
private:
uint64_t index_id_;
bool is_unique_index_;
bool is_index_back_;
@ -276,7 +276,7 @@ class IndexInfoEntry {
};
class ObIndexInfoCache {
public:
public:
ObIndexInfoCache() : table_id_(common::OB_INVALID_ID), base_table_id_(common::OB_INVALID_ID), entry_count_(0)
{
MEMSET(index_entrys_, 0, sizeof(index_entrys_));
@ -301,7 +301,7 @@ class ObIndexInfoCache {
int add_index_info_entry(IndexInfoEntry*);
TO_STRING_KV(K_(table_id), K_(base_table_id), K_(entry_count));
private:
private:
uint64_t table_id_;
uint64_t base_table_id_;
int64_t entry_count_;

View File

@ -24,7 +24,7 @@ typedef common::ObSEArray<common::ObSEArray<int64_t, 8, common::ModulePageAlloca
common::ModulePageAllocator, true>
RowParamMap;
class ObInsertLogPlan : public ObLogPlan {
public:
public:
ObInsertLogPlan(ObOptimizerContext& ctx, const ObDMLStmt* insert_stmt) : ObLogPlan(ctx, insert_stmt), insert_op_(NULL)
{}
virtual ~ObInsertLogPlan()
@ -36,7 +36,7 @@ class ObInsertLogPlan : public ObLogPlan {
return row_params_map_;
}
protected:
protected:
int generate_values_op_as_child(ObLogicalOperator*& expr_values);
bool is_self_part_insert();
int map_value_param_index();
@ -47,10 +47,10 @@ class ObInsertLogPlan : public ObLogPlan {
int allocate_insert_all_op(ObInsertStmt& insert_stmt, ObLogInsert*& insert_op);
int allocate_pdml_insert_as_top(ObLogicalOperator*& top_op);
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObInsertLogPlan);
private:
private:
RowParamMap row_params_map_;
ObLogInsert* insert_op_;
};

View File

@ -29,7 +29,7 @@ namespace sql {
class ObPhyPartitionLocationInfo;
class ObPhyTableLocationInfo;
class ObIntersectRoutePolicy : public ObRoutePolicy {
public:
public:
using ObRoutePolicy::ObRoutePolicy;
int init_candidate_replicas(const common::ObList<common::ObAddr, common::ObArenaAllocator>& candidate_server_list,
common::ObIArray<CandidateReplica>& candi_replicas);

View File

@ -132,7 +132,7 @@ struct BaseTableOptInfo {
};
class Path {
public:
public:
Path()
: path_type_(INVALID),
parent_(NULL),
@ -256,7 +256,7 @@ class Path {
TO_STRING_KV(K_(path_type), K_(cost), K_(op_cost), K_(exec_params), K_(ordering), K_(is_inner_path),
K_(inner_row_count), K_(interesting_order_info));
public:
public:
// member variables
PathType path_type_;
ObJoinOrder* parent_;
@ -274,12 +274,12 @@ class Path {
common::ObSEArray<std::pair<int64_t, ObRawExpr*>, 4, common::ModulePageAllocator, true> nl_params_; // parameters for
// inner path
private:
private:
DISALLOW_COPY_AND_ASSIGN(Path);
};
class AccessPath : public Path {
public:
public:
AccessPath(
uint64_t table_id, uint64_t ref_table_id, uint64_t index_id, ObJoinOrder* parent, ObOrderDirection direction)
: Path(ACCESS, parent),
@ -408,7 +408,7 @@ class AccessPath : public Path {
K_(output_row_count), K_(phy_query_range_row_count), K_(query_range_row_count), K_(index_back_row_count),
K_(index_back_cost), K_(est_cost_info), K_(sample_info), K_(range_prefix_count));
public:
public:
// member variables
uint64_t table_id_;
uint64_t ref_table_id_;
@ -436,12 +436,12 @@ class AccessPath : public Path {
int64_t range_prefix_count_; // prefix count
BaseTableOptInfo* table_opt_info_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(AccessPath);
};
class JoinPath : public Path {
public:
public:
JoinPath()
: Path(JOIN, NULL),
left_path_(NULL),
@ -514,7 +514,7 @@ class JoinPath : public Path {
BUF_PRINTF(">");
}
public:
public:
const Path* left_path_;
const Path* right_path_;
JoinAlgo join_algo_; // join method
@ -529,12 +529,12 @@ class JoinPath : public Path {
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> equal_join_condition_;
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> other_join_condition_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(JoinPath);
};
class SubQueryPath : public Path {
public:
public:
SubQueryPath() : Path(SUBQUERY, NULL), subquery_id_(common::OB_INVALID_ID), root_(NULL)
{}
SubQueryPath(ObLogicalOperator* root) : Path(SUBQUERY, NULL), subquery_id_(common::OB_INVALID_ID), root_(root)
@ -548,11 +548,11 @@ class SubQueryPath : public Path {
BUF_PRINTF("%lu", subquery_id_);
}
public:
public:
uint64_t subquery_id_;
ObLogicalOperator* root_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(SubQueryPath);
};
@ -581,7 +581,7 @@ struct InnerPathInfo {
typedef common::ObSEArray<InnerPathInfo, 8, common::ModulePageAllocator, true> InnerPathInfos;
class ObJoinOrder {
public:
public:
struct PathHelper {
PathHelper()
: is_inner_path_(false),
@ -1026,7 +1026,7 @@ class ObJoinOrder {
}
TO_STRING_KV(K_(type), K_(output_rows), K_(interesting_paths));
private:
private:
int add_access_filters(
AccessPath* path, const common::ObIArray<ObRawExpr*>& index_keys, const ObIArray<ObRawExpr*>& restrict_infos);
@ -1128,11 +1128,11 @@ class ObJoinOrder {
const ObIArray<ObRawExpr*>& join_condition, const ObIArray<ObRawExpr*>& equal_join_condition,
const ObJoinType join_type);
private:
private:
int find_matching_cond(const ObIArray<ObRawExpr*>& join_conditions, const OrderItem& left_ordering,
const OrderItem& right_ordering, const EqualSets& equal_sets, int64_t& common_prefix_idx);
private:
private:
int compute_cost_and_prune_access_path(PathHelper& helper, ObIArray<AccessPath*>& access_paths);
int revise_output_rows_after_creating_path(PathHelper& helper, ObIArray<AccessPath*>& access_paths);
int fill_filters(const common::ObIArray<ObRawExpr*>& all_filters, const ObQueryRange* query_range,
@ -1195,7 +1195,7 @@ class ObJoinOrder {
int add_partition_column(
ObDMLStmt& stmt, const uint64_t table_id, const uint64_t column_id, ObIArray<ColumnItem>& partition_columns);
public:
public:
inline double get_average_output_row_size()
{
return avg_output_row_size_;
@ -1209,7 +1209,7 @@ class ObJoinOrder {
avg_output_row_size_ = average_row_size;
}
private:
private:
int choose_best_inner_path(const ObJoinOrder* left_tree, const ObJoinOrder* right_tree,
const ObIArray<ObRawExpr*>& join_conditions, const ObJoinType join_type, const bool force_mat,
ObIArray<Path*>& right_inner_paths);
@ -1262,7 +1262,7 @@ class ObJoinOrder {
friend class ::test::TestJoinOrder_ob_join_order_param_check_Test;
friend class ::test::TestJoinOrder_ob_join_order_src_Test;
private:
private:
common::ObIAllocator* allocator_;
ObLogPlan* plan_;
PathType type_;
@ -1299,7 +1299,7 @@ class ObJoinOrder {
// cache for all inner path
InnerPathInfos inner_path_infos_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObJoinOrder);
};
} // namespace sql

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObLogAppend : public ObLogicalOperator {
public:
public:
ObLogAppend(ObLogPlan& plan);
virtual ~ObLogAppend()
{}
@ -47,7 +47,7 @@ class ObLogAppend : public ObLogicalOperator {
}
VIRTUAL_TO_STRING_KV(K_(sub_plan_num));
private:
private:
ObLogPlan* sub_plan_[OB_SQL_MAX_CHILD_OPERATOR_NUM];
int64_t sub_plan_num_;
};

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogConflictRowFetcher : public ObLogicalOperator {
public:
public:
ObLogConflictRowFetcher(ObLogPlan& plan)
: ObLogicalOperator(plan),
table_id_(common::OB_INVALID_ID),
@ -79,10 +79,10 @@ class ObLogConflictRowFetcher : public ObLogicalOperator {
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const override;
TO_STRING_KV(K_(table_id), K_(index_tid), K_(only_data_table), K_(conflict_exprs), K_(access_exprs));
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
private:
private:
uint64_t table_id_;
uint64_t index_tid_;
bool only_data_table_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObLogCount : public ObLogicalOperator {
public:
public:
ObLogCount(ObLogPlan& plan) : ObLogicalOperator(plan), rownum_limit_expr_(NULL)
{}
virtual ~ObLogCount()
@ -43,7 +43,7 @@ class ObLogCount : public ObLogicalOperator {
virtual int allocate_expr_pre(ObAllocExprContext& ctx) override;
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
private:
private:
ObRawExpr* rownum_limit_expr_;
DISALLOW_COPY_AND_ASSIGN(ObLogCount);
};

View File

@ -43,7 +43,7 @@ namespace sql {
}
class ObLogDelUpd : public ObLogicalOperator {
public:
public:
ObLogDelUpd(ObLogPlan& plan);
virtual ~ObLogDelUpd() = default;
inline const common::ObIArray<TableColumns>* get_all_table_columns()
@ -240,7 +240,7 @@ class ObLogDelUpd : public ObLogicalOperator {
return table_phy_location_type_;
}
protected:
protected:
int generate_table_sharding_info(uint64_t loc_table_id, uint64_t ref_table_id, const ObPartHint* part_hint,
ObTablePartitionInfo& table_partition_info, ObShardingInfo& sharding_info);
int calculate_table_location(uint64_t loc_table_id, uint64_t ref_table_id, const ObPartHint* part_hint,
@ -252,14 +252,14 @@ class ObLogDelUpd : public ObLogicalOperator {
ObShardingInfo& sharding_info, const ObPhyTableLocationInfo* phy_table_locaion_info, bool& is_needed);
int add_all_table_assignments_to_ctx(const ObTablesAssignments* tables_assignments, ObAllocExprContext& ctx);
private:
private:
int get_modify_table_id(uint64_t& table_id) const;
int allocate_exchange_post_non_pdml(AllocExchContext* ctx);
int allocate_exchange_post_pdml(AllocExchContext* ctx);
int check_pdml_need_exchange(AllocExchContext* ctx, ObShardingInfo& target_sharding_info, bool& need_exchange);
int do_reordering_project_columns(ObLogicalOperator& child);
protected:
protected:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
virtual int add_exprs_to_ctx_for_pdml(
ObAllocExprContext& ctx, const ObIArray<ObRawExpr*>& input_exprs, uint64_t producer_id);
@ -267,7 +267,7 @@ class ObLogDelUpd : public ObLogicalOperator {
int check_multi_table_dml_for_nested_execution(bool& is_needed);
int set_hash_dist_column_exprs(ObExchangeInfo& exch_info, uint64_t index_id) const;
protected:
protected:
const common::ObIArray<TableColumns>* all_table_columns_;
const common::ObIArray<ObRawExpr*>* check_constraint_exprs_;
const common::ObIArray<ObColumnRefRawExpr*>* table_columns_;
@ -287,11 +287,11 @@ class ObLogDelUpd : public ObLogicalOperator {
ObTableLocationType table_phy_location_type_;
bool table_location_uncertain_;
private:
private:
ObRawExpr* pdml_partition_id_expr_;
bool pdml_is_returning_;
protected:
protected:
bool need_alloc_part_id_expr_;
};
} // namespace sql

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogDelete : public ObLogDelUpd {
public:
public:
ObLogDelete(ObLogPlan& plan) : ObLogDelUpd(plan)
{}
virtual ~ObLogDelete()
@ -43,7 +43,7 @@ class ObLogDelete : public ObLogDelUpd {
}
virtual const char* get_name() const;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogDelete);
};
} // namespace sql

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObLogDistinct : public ObLogicalOperator {
public:
public:
ObLogDistinct(ObLogPlan& plan) : ObLogicalOperator(plan), algo_(AGGREGATE_UNINITIALIZED), is_block_mode_(false)
{}
virtual ~ObLogDistinct()
@ -91,12 +91,12 @@ class ObLogDistinct : public ObLogicalOperator {
virtual int compute_op_ordering() override;
virtual int generate_link_sql_pre(GenLinkStmtContext& link_ctx) override;
private:
private:
common::ObSEArray<ObRawExpr*, 16, common::ModulePageAllocator, true> distinct_exprs_;
AggregateAlgo algo_;
bool is_block_mode_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogDistinct);
};

View File

@ -20,7 +20,7 @@ namespace sql {
class ObLogExchange : public ObLogicalOperator {
typedef common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> RepartColumnExprs;
public:
public:
ObLogExchange(ObLogPlan& plan)
: ObLogicalOperator(plan),
is_producer_(false),
@ -233,14 +233,14 @@ class ObLogExchange : public ObLogicalOperator {
}
int update_sharding_conds(AllocExchContext& ctx);
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
virtual int print_plan_head_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type) override;
virtual int inner_replace_generated_agg_expr(
const common::ObIArray<std::pair<ObRawExpr*, ObRawExpr*> >& to_replace_exprs) override;
private:
private:
// the 'partition key' expressions
bool is_producer_; /* true if the exchange the producer */
bool is_remote_; /* true if the exchange is remote single-server */

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogExprValues : public ObLogicalOperator {
public:
public:
ObLogExprValues(ObLogPlan& plan) : ObLogicalOperator(plan), need_columnlized_(false)
{}
virtual int allocate_exchange_post(AllocExchContext* ctx) override;
@ -61,10 +61,10 @@ class ObLogExprValues : public ObLogicalOperator {
virtual int allocate_expr_post(ObAllocExprContext& ctx) override;
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const override;
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
private:
private:
bool need_columnlized_;
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> value_exprs_;
// only engine 3.0 used

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogForUpdate : public ObLogDelUpd {
public:
public:
ObLogForUpdate(ObLogPlan& plan);
virtual ~ObLogForUpdate()
{}
@ -64,7 +64,7 @@ class ObLogForUpdate : public ObLogDelUpd {
int is_rowkey_nullable(const uint64_t table_id, bool& is_nullable) const;
int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
private:
private:
bool skip_locked_;
int64_t wait_ts_;
ObSEArray<uint64_t, 4, common::ModulePageAllocator, true> lock_tables_;

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogFunctionTable : public ObLogicalOperator {
public:
public:
ObLogFunctionTable(ObLogPlan& plan) : ObLogicalOperator(plan), table_id_(OB_INVALID_ID), value_expr_(NULL)
{}
@ -58,10 +58,10 @@ class ObLogFunctionTable : public ObLogicalOperator {
}
int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
private:
private:
uint64_t table_id_;
ObRawExpr* value_expr_;
DISALLOW_COPY_AND_ASSIGN(ObLogFunctionTable);

View File

@ -21,7 +21,7 @@ namespace oceanbase {
namespace sql {
class ObLogGranuleIterator : public ObLogicalOperator {
public:
public:
ObLogGranuleIterator(ObLogPlan& plan)
: ObLogicalOperator(plan),
tablet_size_(common::OB_DEFAULT_TABLET_SIZE),
@ -131,7 +131,7 @@ class ObLogGranuleIterator : public ObLogicalOperator {
int is_partition_gi(bool& partition_granule) const;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogGranuleIterator);
int64_t tablet_size_;
uint64_t gi_attri_flag_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObLogSort;
class ObLogGroupBy : public ObLogicalOperator {
public:
public:
ObLogGroupBy(ObLogPlan& plan)
: ObLogicalOperator(plan),
group_exprs_(),
@ -130,7 +130,7 @@ class ObLogGroupBy : public ObLogicalOperator {
VIRTUAL_TO_STRING_KV(K_(group_exprs), K_(rollup_exprs), K_(aggr_exprs), K_(avg_div_exprs),
K_(approx_count_distinct_estimate_ndv_exprs), K_(algo), K_(distinct_card));
private:
private:
/**
* Aggregation functions analysis for child group-by operator
*
@ -172,7 +172,7 @@ class ObLogGroupBy : public ObLogicalOperator {
int child_has_exchange(const ObLogicalOperator* op, bool& find);
virtual int compute_one_row_info() override;
private:
private:
// the 'group-by' expressions
common::ObSEArray<ObRawExpr*, 8, common::ModulePageAllocator, true> group_exprs_;
// the rollup expressions

View File

@ -21,7 +21,7 @@ namespace sql {
class ObSelectLogPlan;
class ObPartIdRowMapManager;
class ObLogDupKeyChecker {
public:
public:
ObLogDupKeyChecker()
: unique_index_cnt_(0),
gui_lookup_root_(NULL),
@ -100,7 +100,7 @@ class ObLogDupKeyChecker {
TO_STRING_KV(
K_(unique_index_cnt), KPC_(gui_lookup_root), KPC_(table_scan_root), K_(gui_scan_roots), KPC_(constraint_infos));
private:
private:
int64_t unique_index_cnt_;
ObLogicalOperator* gui_lookup_root_;
ObRawExpr* gui_lookup_calc_part_expr_;
@ -112,7 +112,7 @@ class ObLogDupKeyChecker {
};
class ObLogInsert : public ObLogDelUpd {
public:
public:
ObLogInsert(ObLogPlan& plan)
: ObLogDelUpd(plan),
is_replace_(false),
@ -255,11 +255,11 @@ class ObLogInsert : public ObLogDelUpd {
return value_exprs_;
}
private:
private:
void calc_phy_location_type();
int set_hash_dist_column_exprs(ObExchangeInfo& exch_info, uint64_t index_tid) const;
protected:
protected:
int add_exprs_without_column_conv(
const common::ObIArray<ObRawExpr*>& src_exprs, common::ObIArray<ObRawExpr*>& dst_exprs);
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
@ -268,7 +268,7 @@ class ObLogInsert : public ObLogDelUpd {
bool is_table_insert_sequence_part_key() const;
virtual int check_output_dep_specific(ObRawExprCheckDep& checker);
protected:
protected:
bool is_replace_;
/**
* @note These fields are added for the compatiblity of MySQL syntax and are not

View File

@ -20,7 +20,7 @@ namespace oceanbase {
namespace sql {
class ObLogInsertAll : public ObLogInsert {
public:
public:
ObLogInsertAll(ObLogPlan& plan)
: ObLogInsert(plan),
is_multi_table_insert_(false),
@ -102,12 +102,12 @@ class ObLogInsertAll : public ObLogInsert {
}
int remove_const_expr(const common::ObIArray<ObRawExpr*>& old_exprs, common::ObIArray<ObRawExpr*>& new_exprs) const;
protected:
protected:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
virtual int need_multi_table_dml(AllocExchContext& ctx, ObShardingInfo& sharding_info, bool& is_needed) override;
int is_insert_table_id(uint64_t table_id, bool& is_true) const;
private:
private:
bool is_multi_table_insert_;
bool is_multi_insert_first_;
bool is_multi_conditions_insert_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObLogicalOperator;
class ObLogJoin : public ObLogicalOperator {
public:
public:
ObLogJoin(ObLogPlan& plan)
: ObLogicalOperator(plan),
join_conditions_(),
@ -291,7 +291,7 @@ class ObLogJoin : public ObLogicalOperator {
return connect_by_extra_exprs_.assign(exprs);
}
private:
private:
inline bool can_enable_gi_partition_pruning()
{
return (NESTED_LOOP_JOIN == join_algo_) && join_dist_algo_ == JoinDistAlgo::DIST_PARTITION_NONE;
@ -335,7 +335,7 @@ class ObLogJoin : public ObLogicalOperator {
return SM_NONE != slave_mapping_type_;
}
private:
private:
// all join predicates
common::ObSEArray<ObRawExpr*, 8, common::ModulePageAllocator, true> join_conditions_; // equal join condition, for
// merge-join

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogLimit : public ObLogicalOperator {
public:
public:
ObLogLimit(ObLogPlan& plan)
: ObLogicalOperator(plan),
is_calc_found_rows_(false),
@ -106,7 +106,7 @@ class ObLogLimit : public ObLogicalOperator {
return is_fetch_with_ties_;
}
private:
private:
bool is_calc_found_rows_;
bool has_union_child_;
bool is_top_limit_;

View File

@ -21,7 +21,7 @@ namespace sql {
typedef common::ObIArray<common::ObString> ObStringIArray;
class ObLogLink : public ObLogicalOperator {
public:
public:
ObLogLink(ObLogPlan& plan);
virtual ~ObLogLink()
{}
@ -47,11 +47,11 @@ class ObLogLink : public ObLogicalOperator {
return stmt_fmt_len_;
}
private:
private:
int gen_link_stmt_fmt_buf();
int gen_link_stmt_param_infos();
private:
private:
common::ObIAllocator& allocator_;
ObLinkStmt link_stmt_;
char* stmt_fmt_buf_;

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObLogMaterial : public ObLogicalOperator {
public:
public:
ObLogMaterial(ObLogPlan& plan) : ObLogicalOperator(plan)
{}
virtual ~ObLogMaterial()
@ -36,7 +36,7 @@ class ObLogMaterial : public ObLogicalOperator {
return true;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogMaterial);
};
} // namespace sql

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogMerge : public ObLogInsert {
public:
public:
ObLogMerge(ObLogPlan& plan)
: ObLogInsert(plan),
match_condition_exprs_(NULL),
@ -89,13 +89,13 @@ class ObLogMerge : public ObLogInsert {
int classify_merge_subquery_expr(const ObIArray<ObRawExpr*>& exprs, ObIArray<ObRawExpr*>& subquery_exprs,
ObIArray<ObRawExpr*>& non_subquery_exprs);
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
virtual int check_output_dep_specific(ObRawExprCheckDep& checker) override;
int add_all_source_table_columns_to_ctx(ObAllocExprContext& ctx);
DISALLOW_COPY_AND_ASSIGN(ObLogMerge);
private:
private:
const common::ObIArray<ObRawExpr*>* match_condition_exprs_;
const common::ObIArray<ObRawExpr*>* insert_condition_exprs_;
const common::ObIArray<ObRawExpr*>* update_condition_exprs_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObLogMonitoringDump : public ObLogicalOperator {
public:
public:
ObLogMonitoringDump(ObLogPlan& plan) : ObLogicalOperator(plan), flags_(0), dst_op_line_id_(0)
{}
virtual ~ObLogMonitoringDump() = default;
@ -49,7 +49,7 @@ class ObLogMonitoringDump : public ObLogicalOperator {
return dst_op_line_id_;
}
private:
private:
uint64_t flags_;
uint64_t dst_op_line_id_;
DISALLOW_COPY_AND_ASSIGN(ObLogMonitoringDump);

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObLogMVTableScan : public ObLogTableScan {
public:
public:
ObLogMVTableScan(ObLogPlan& plan);
virtual ~ObLogMVTableScan()
{}
@ -33,7 +33,7 @@ class ObLogMVTableScan : public ObLogTableScan {
depend_table_id_ = depend_tid;
}
private:
private:
ObTablePartitionInfo right_table_partition_info_;
uint64_t depend_table_id_;
};

View File

@ -148,7 +148,7 @@ inline const char* JoinAlgo_to_hint_str(JoinAlgo algo)
}
class ObLogPlan;
class ObLogOperatorFactory {
public:
public:
explicit ObLogOperatorFactory(common::ObIAllocator& allocator);
~ObLogOperatorFactory()
{
@ -157,7 +157,7 @@ class ObLogOperatorFactory {
ObLogicalOperator* allocate(ObLogPlan& plan, log_op_def::ObLogOpType type);
void destory();
private:
private:
common::ObIAllocator& allocator_;
common::ObObjStore<ObLogicalOperator*, common::ObIAllocator&> op_store_;
};

View File

@ -108,7 +108,7 @@ struct plan_line {
// explain plan text
class planText {
public:
public:
static const int64_t SIMPLE_COLUMN_NUM = 3;
planText(char* buffer, const int64_t buffer_len, ExplainType type)
: level(0),
@ -167,7 +167,7 @@ typedef common::ObSEArray<ObJoinOrder*, 4> JoinOrderArray;
* Base class for logical plan for all DML/select statements
*/
class ObLogPlan {
public:
public:
friend class ::test::ObLogPlanTest_ob_explain_test_Test;
typedef common::ObList<common::ObAddr, common::ObArenaAllocator> ObAddrList;
@ -177,7 +177,7 @@ class ObLogPlan {
static int select_replicas(ObExecContext& exec_ctx, bool is_weak, const common::ObAddr& local_server,
common::ObIArray<ObPhyTableLocationInfo*>& phy_tbl_loc_info_list);
public:
public:
ObLogPlan(ObOptimizerContext& ctx, const ObDMLStmt* stmt);
virtual ~ObLogPlan();
@ -531,7 +531,7 @@ class ObLogPlan {
int check_fullfill_safe_update_mode(ObLogicalOperator* op);
int do_check_fullfill_safe_update_mode(ObLogicalOperator* top, bool& is_not_fullfill);
public:
public:
struct CandidatePlan {
CandidatePlan(ObLogicalOperator* plan_tree) : plan_tree_(plan_tree)
{}
@ -809,7 +809,7 @@ class ObLogPlan {
return startup_filters_;
}
protected:
protected:
int update_plans_interesting_order_info(ObIArray<CandidatePlan>& candidate_plans, const int64_t check_scope);
int prune_and_keep_best_plans(ObIArray<CandidatePlan>& candidate_plans);
@ -1053,7 +1053,7 @@ class ObLogPlan {
int calc_plan_resource();
private: // member functions
private: // member functions
static int set_table_location(
ObTaskExecutorCtx& task_exec_ctx, common::ObIArray<ObPhyTableLocationInfo*>& phy_tbl_loc_info_list);
@ -1082,10 +1082,10 @@ class ObLogPlan {
const common::ObIArray<LocationConstraint>& base_location_cons, ObIArray<PwjTable>& pwj_tables,
ObPwjComparer& pwj_comparer, PWJPartitionIdMap& pwj_map) const;
private:
private:
static const int64_t DEFAULT_SEARCH_SPACE_RELS = 10;
protected: // member variable
protected: // member variable
ObOptimizerContext& optimizer_context_;
common::ObIAllocator& allocator_;
const ObDMLStmt* stmt_;
@ -1097,7 +1097,7 @@ class ObLogPlan {
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> pushdown_filters_;
private: // member variable
private: // member variable
ObQueryRefRawExpr* query_ref_;
ObLogicalOperator* root_; // root operator
common::ObString sql_text_; // SQL string
@ -1109,7 +1109,7 @@ class ObLogPlan {
common::ObSEArray<ObRawExpr*, 16, common::ModulePageAllocator, true> startup_filters_;
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> user_var_filters_;
private:
private:
struct LeadingInfo {
TO_STRING_KV(K_(table_set), K_(left_table_set), K_(right_table_set));

View File

@ -24,17 +24,17 @@ class ObLogPlan;
class ObOptimizerContext;
class ObDMLStmt;
class ObLogPlanFactory {
public:
public:
explicit ObLogPlanFactory(common::ObIAllocator& allocator);
~ObLogPlanFactory();
ObLogPlan* create(ObOptimizerContext& ctx, const ObDMLStmt& stmt);
void destroy();
private:
private:
common::ObIAllocator& allocator_;
common::ObObjStore<ObLogPlan*, common::ObIAllocator&, true> plan_store_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogPlanFactory);
};
} // namespace sql

View File

@ -21,7 +21,7 @@ namespace oceanbase {
namespace sql {
class ObLogSelectInto : public ObLogicalOperator {
public:
public:
ObLogSelectInto(ObLogPlan& plan)
: ObLogicalOperator(plan),
into_type_(T_INTO_OUTFILE),
@ -102,7 +102,7 @@ class ObLogSelectInto : public ObLogicalOperator {
virtual uint64_t hash(uint64_t seed) const;
virtual int copy_without_child(ObLogicalOperator*& out);
private:
private:
ObItemType into_type_;
common::ObObj outfile_name_;
common::ObObj filed_str_;

View File

@ -17,10 +17,10 @@
namespace oceanbase {
namespace sql {
class ObLogSequence : public ObLogicalOperator {
private:
private:
typedef common::ObSEArray<uint64_t, 4> SequenceIdArray;
public:
public:
ObLogSequence(ObLogPlan& plan) : ObLogicalOperator(plan)
{}
virtual ~ObLogSequence()
@ -39,7 +39,7 @@ class ObLogSequence : public ObLogicalOperator {
}
virtual int est_cost() override;
private:
private:
SequenceIdArray nextval_seq_ids_;
};
} // namespace sql

View File

@ -20,7 +20,7 @@ namespace sql {
class ObBasicCostInfo;
class ObLogSet : public ObLogicalOperator {
public:
public:
ObLogSet(ObLogPlan& plan)
: ObLogicalOperator(plan),
is_distinct_(true),
@ -180,7 +180,7 @@ class ObLogSet : public ObLogicalOperator {
return SM_NONE != slave_mapping_type_;
}
private:
private:
virtual int inner_replace_generated_agg_expr(
const common::ObIArray<std::pair<ObRawExpr*, ObRawExpr*>>& to_replace_exprs) override;
int allocate_implicit_sort_v2_for_set(const int64_t index, common::ObIArray<OrderItem>& order_keys);
@ -206,7 +206,7 @@ class ObLogSet : public ObLogicalOperator {
return ret;
}
private:
private:
bool is_distinct_;
bool is_recursive_union_;
bool is_breadth_search_;

View File

@ -23,7 +23,7 @@ class ObLogSort : public ObLogicalOperator {
// for calc pushed down sort cost
static constexpr double DISTRIBUTED_SORT_COST_RATIO = .8;
public:
public:
ObLogSort(ObLogPlan& plan)
: ObLogicalOperator(plan),
sort_keys_(),
@ -134,14 +134,14 @@ class ObLogSort : public ObLogicalOperator {
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
virtual int generate_link_sql_pre(GenLinkStmtContext& link_ctx) override;
protected:
protected:
virtual int inner_replace_generated_agg_expr(
const common::ObIArray<std::pair<ObRawExpr*, ObRawExpr*>>& to_replace_exprs);
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
private:
private:
common::ObSEArray<OrderItem, 8, common::ModulePageAllocator, true> sort_keys_;
ObRawExpr* topn_count_;
int64_t minimum_row_count_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObBasicCostInfo;
class ObLogSubPlanFilter : public ObLogicalOperator {
public:
public:
ObLogSubPlanFilter(ObLogPlan& plan)
: ObLogicalOperator(plan),
exec_params_(),
@ -127,14 +127,14 @@ class ObLogSubPlanFilter : public ObLogicalOperator {
int allocate_granule_post(AllocGIContext& ctx);
virtual int compute_one_row_info() override;
protected:
protected:
common::ObSEArray<std::pair<int64_t, ObRawExpr*>, 8, common::ModulePageAllocator, true> exec_params_;
common::ObSEArray<std::pair<int64_t, ObRawExpr*>, 8, common::ModulePageAllocator, true> onetime_exprs_;
common::ObBitSet<> init_plan_idxs_;
common::ObBitSet<> one_time_idxs_;
bool update_set_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogSubPlanFilter);
};
} // end of namespace sql

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogSubPlanScan : public ObLogicalOperator {
public:
public:
ObLogSubPlanScan(ObLogPlan& plan)
: ObLogicalOperator(plan), subquery_id_(common::OB_INVALID_ID), subquery_name_(), access_exprs_()
{}
@ -60,12 +60,12 @@ class ObLogSubPlanScan : public ObLogicalOperator {
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
virtual int generate_link_sql_pre(GenLinkStmtContext& link_ctx) override;
private:
private:
virtual int print_operator_for_outline(planText& plan_text);
virtual int is_used_join_type_hint(JoinAlgo join_algo, bool& is_used);
virtual int is_used_in_leading_hint(bool& is_used);
private:
private:
uint64_t subquery_id_;
common::ObString subquery_name_;
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> access_exprs_;

View File

@ -21,7 +21,7 @@ namespace sql {
class Path;
class ObLogTableLookup : public ObLogicalOperator {
public:
public:
ObLogTableLookup(ObLogPlan& plan)
: ObLogicalOperator(plan),
table_id_(common::OB_INVALID_ID),
@ -99,7 +99,7 @@ class ObLogTableLookup : public ObLogicalOperator {
int init_calc_part_id_expr();
int replace_gen_column(ObRawExpr* part_expr, ObRawExpr*& new_part_expr);
private:
private:
uint64_t table_id_;
uint64_t ref_table_id_;
uint64_t index_id_;

View File

@ -27,7 +27,7 @@ class ObLogTableScan : public ObLogicalOperator {
// ObLogTableLookup has a log tsc to read remote data table.
friend class ObLogTableLookup;
public:
public:
ObLogTableScan(ObLogPlan& plan)
: ObLogicalOperator(plan),
table_id_(common::OB_INVALID_ID),
@ -692,7 +692,7 @@ class ObLogTableScan : public ObLogicalOperator {
int add_mapping_column_for_vt(ObColumnRefRawExpr* col_expr);
private: // member functions
private: // member functions
// called when index_back_ set
int pick_out_query_range_exprs();
int pick_out_startup_filters();
@ -724,7 +724,7 @@ class ObLogTableScan : public ObLogicalOperator {
virtual int check_output_dep_specific(ObRawExprCheckDep& checker) override;
int try_add_extra_access_exprs_for_lob_col();
protected: // memeber variables
protected: // memeber variables
// basic info
uint64_t table_id_; // table id or alias table id
uint64_t ref_table_id_; // base table id

View File

@ -21,7 +21,7 @@
namespace oceanbase {
namespace sql {
class ObLogTempTableAccess : public ObLogicalOperator {
public:
public:
ObLogTempTableAccess(ObLogPlan& plan);
virtual ~ObLogTempTableAccess();
virtual int copy_without_child(ObLogicalOperator*& out)
@ -74,10 +74,10 @@ class ObLogTempTableAccess : public ObLogicalOperator {
}
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogTempTableAccess);
private:
private:
uint64_t table_id_;
uint64_t ref_table_id_;
common::ObString temp_table_name_;

View File

@ -21,7 +21,7 @@
namespace oceanbase {
namespace sql {
class ObLogTempTableInsert : public ObLogicalOperator {
public:
public:
ObLogTempTableInsert(ObLogPlan& plan);
virtual ~ObLogTempTableInsert();
@ -48,7 +48,7 @@ class ObLogTempTableInsert : public ObLogicalOperator {
return temp_table_name_;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogTempTableInsert);
uint64_t ref_table_id_;
common::ObString temp_table_name_;

View File

@ -20,7 +20,7 @@
namespace oceanbase {
namespace sql {
class ObLogTempTableTransformation : public ObLogicalOperator {
public:
public:
ObLogTempTableTransformation(ObLogPlan& plan);
virtual ~ObLogTempTableTransformation();

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogTopk : public ObLogicalOperator {
public:
public:
ObLogTopk(ObLogPlan& plan)
: ObLogicalOperator(plan),
minimum_row_count_(0),
@ -55,7 +55,7 @@ class ObLogTopk : public ObLogicalOperator {
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
private:
private:
int64_t minimum_row_count_;
int64_t topk_precision_;
ObRawExpr* topk_limit_count_;

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObLogUnpivot : public ObLogicalOperator {
public:
public:
ObLogUnpivot(ObLogPlan& plan)
: ObLogicalOperator(plan), subquery_id_(common::OB_INVALID_ID), subquery_name_(), access_exprs_()
{}
@ -64,13 +64,13 @@ class ObLogUnpivot : public ObLogicalOperator {
virtual int compute_fd_item_set() override;
virtual int compute_one_row_info() override;
public:
public:
uint64_t subquery_id_;
common::ObString subquery_name_;
common::ObArray<ObRawExpr*, common::ModulePageAllocator, true> access_exprs_;
ObUnpivotInfo unpivot_info_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObLogUnpivot);
};

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogUpdate : public ObLogDelUpd {
public:
public:
ObLogUpdate(ObLogPlan& plan) : ObLogDelUpd(plan), tables_assignments_(NULL), update_set_(false)
{}
virtual ~ObLogUpdate()
@ -54,14 +54,14 @@ class ObLogUpdate : public ObLogDelUpd {
virtual int inner_append_not_produced_exprs(ObRawExprUniqueSet& raw_exprs) const;
private:
private:
virtual int print_my_plan_annotation(char* buf, int64_t& buf_len, int64_t& pos, ExplainType type);
int get_update_table(ObDMLStmt* stmt, ObColumnRefRawExpr* col_expr, uint64_t& ref_id);
virtual int need_multi_table_dml(AllocExchContext& ctx, ObShardingInfo& sharding_info, bool& is_needed) override;
private:
private:
// MySQL only, https://dev.mysql.com/doc/refman/8.0/en/update.html
const ObTablesAssignments* tables_assignments_;
// update ... set (a,b) = (subquery), (d,e) = (subquery)

View File

@ -23,7 +23,7 @@ namespace sql {
* ObLogValues is currently being used as 'explain' and 'help' operator.
*/
class ObLogValues : public ObLogicalOperator {
public:
public:
static const int64_t MAX_EXPLAIN_BUFFER_SIZE = 1024 * 1024;
ObLogValues(ObLogPlan& plan)
: ObLogicalOperator(plan), explain_plan_(NULL), stmt_(NULL), row_store_(plan.get_allocator())
@ -96,7 +96,7 @@ class ObLogValues : public ObLogicalOperator {
return ret;
}
private:
private:
ObLogPlan* explain_plan_;
ObStmt* stmt_;
common::ObRowStore row_store_;

View File

@ -17,7 +17,7 @@
namespace oceanbase {
namespace sql {
class ObLogWindowFunction : public ObLogicalOperator {
public:
public:
ObLogWindowFunction(ObLogPlan& plan) : ObLogicalOperator(plan), is_parallel_(false)
{}
virtual ~ObLogWindowFunction()
@ -52,7 +52,7 @@ class ObLogWindowFunction : public ObLogicalOperator {
}
int match_parallel_condition(bool& can_parallel);
private:
private:
ObSEArray<ObWinFunRawExpr*, 4> win_exprs_;
bool is_parallel_;
};

View File

@ -279,7 +279,7 @@ struct FilterCompare {
};
class AdjustSortContext {
public:
public:
bool has_exchange_;
// count the exchange, in-out will be add 2
int64_t exchange_cnt_;
@ -289,7 +289,7 @@ class AdjustSortContext {
};
class AllocGIContext {
public:
public:
enum GIState {
GIS_NORMAL = 0,
GIS_IN_PARTITION_WISE,
@ -297,7 +297,7 @@ class AllocGIContext {
GIS_PARTITION,
};
public:
public:
explicit AllocGIContext(int64_t parallel)
: alloc_gi_(false),
tablet_size_(common::OB_DEFAULT_TABLET_SIZE),
@ -394,7 +394,7 @@ class AllocGIContext {
};
class ObAllocGIInfo {
public:
public:
ObAllocGIInfo()
: state_(AllocGIContext::GIS_NORMAL),
pw_op_ptr_(nullptr),
@ -424,14 +424,14 @@ class ObAllocGIInfo {
};
class AllocMDContext {
public:
public:
AllocMDContext() : org_op_id_(0){};
~AllocMDContext() = default;
int64_t org_op_id_;
};
class AllocExchContext {
public:
public:
enum DistrStat {
UNINITIALIZED = 0,
LOCAL,
@ -591,7 +591,7 @@ struct ObExchangeInfo {
K_(hash_dist_exprs), "dist_method", ObPQDistributeMethod::get_type_string(dist_method_), K_(px_dop),
K_(px_single), K_(repartition_func_exprs), K_(keep_ordering), K_(pdml_pkey), K_(slave_mapping_type));
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExchangeInfo);
};
@ -599,7 +599,7 @@ struct ObExchangeInfo {
* Expr and its producer operator
*/
class ExprProducer {
public:
public:
ExprProducer()
: expr_(NULL),
producer_branch_(common::OB_INVALID_ID),
@ -678,7 +678,7 @@ struct ObAllocExprContext {
struct ObPxPipeBlockingCtx {
// Look through the pipe (may be blocked by block operator), ended with a exchange operator or not.
class PipeEnd {
public:
public:
PipeEnd() : exch_(false)
{}
explicit PipeEnd(const bool is_exch) : exch_(is_exch)
@ -693,7 +693,7 @@ struct ObPxPipeBlockingCtx {
}
TO_STRING_KV(K_(exch));
private:
private:
bool exch_;
};
@ -730,7 +730,7 @@ struct ObPxPipeBlockingCtx {
OpCtx* alloc();
TO_STRING_KV(K(op_ctxs_));
private:
private:
common::ObIAllocator& alloc_;
common::ObArray<OpCtx*> op_ctxs_;
};
@ -745,7 +745,7 @@ typedef common::ObArray<ObRawExpr*> ObRawExprArray;
class GenLinkStmtContext;
class ObLinkStmt {
public:
public:
explicit ObLinkStmt(common::ObIAllocator& alloc, const ObRawExprIArray& output_exprs)
: link_ctx_(NULL),
alloc_(alloc),
@ -810,7 +810,7 @@ class ObLinkStmt {
int fill_orderby_strs(const ObOrderItemIArray& order_items, const ObRawExprIArray& output_exprs);
int32_t get_total_size() const;
private:
private:
int fill_exprs(
const ObRawExprIArray& exprs, const common::ObString& sep, ObStringList& strs, bool skip_nl_param = false);
int fill_exprs(const ObRawExprIArray& exprs, const common::ObString& sep, ObStringList& strs, ObStringListIter& iter,
@ -833,7 +833,7 @@ class ObLinkStmt {
int do_expr_in_nl_param(ObRawExpr* expr, bool& in_nl_param);
int get_nl_param_columns(ObRawExpr* param_expr, ObRawExprIArray& access_exprs, ObRawExprIArray& param_columns);
public:
public:
GenLinkStmtContext* link_ctx_;
common::ObIAllocator& alloc_;
const ObRawExprIArray& root_output_exprs_;
@ -855,7 +855,7 @@ class ObLinkStmt {
bool is_inited_;
bool is_distinct_;
public:
public:
static const common::ObString TABLE_BLANK_;
static const common::ObString JOIN_ON_;
static const common::ObString LEFT_BRACKET_;
@ -882,7 +882,7 @@ class ObLinkStmt {
};
class GenLinkStmtContext {
public:
public:
GenLinkStmtContext() : dblink_id_(OB_INVALID_ID), link_stmt_(NULL), nl_param_idxs_()
{}
uint64_t dblink_id_;
@ -894,7 +894,7 @@ class GenLinkStmtContext {
class Path;
class ObLogPlan;
class ObLogicalOperator {
public:
public:
friend class ObLogExprValues;
friend class ObLogFunctionTable;
typedef common::ObBitSet<common::OB_MAX_BITSET_SIZE> PPDeps;
@ -1982,12 +1982,12 @@ class ObLogicalOperator {
int check_fulfill_cut_ratio_condition(int64_t dop, double ndv, bool& is_fulfill);
public:
public:
/* child operators */
ObSEArray<ObLogicalOperator*, 16, common::ModulePageAllocator, true> child_;
// ObLogicalOperator *child_[max_num_of_child];
protected:
protected:
enum TraverseType { JOIN_METHOD, MATERIAL_NL, LEADING, PQ_DIST, PQ_MAP };
enum JoinTreeType { INVALID_TYPE, LEFT_DEEP, RIGHT_DEEP, BUSHY };
@ -2106,7 +2106,7 @@ class ObLogicalOperator {
int check_need_sort_for_local_order(const int64_t index, const common::ObIArray<OrderItem>* order_items, bool& need);
protected:
protected:
int alloc_partition_id_expr(uint64_t table_id, ObAllocExprContext& ctx, ObPseudoColumnRawExpr*& partition_id_expr);
void add_join_dist_flag(uint64_t& flags, JoinDistAlgo method) const
@ -2129,7 +2129,7 @@ class ObLogicalOperator {
flags = 0;
}
protected:
protected:
log_op_def::ObLogOpType type_;
ObLogPlan* my_plan_; // the entry point of the plan
common::ObSEArray<ObRawExpr*, 8, common::ModulePageAllocator, true> output_exprs_; // expressions produced
@ -2149,7 +2149,7 @@ class ObLogicalOperator {
uint64_t branch_id_;
uint64_t op_id_;
private:
private:
/**
* Numbering the operator
*/
@ -2199,11 +2199,11 @@ class ObLogicalOperator {
// get the table dop for this dfo
int calc_current_dfo_table_dop(ObLogicalOperator* root, int64_t& table_dop, bool& found_base_table);
private:
private:
int64_t child_id_; // parent child
ObLogicalOperator* parent_; // parent operator
bool is_plan_root_; // plan root operator
protected:
protected:
double cost_; // cost up to this point
double op_cost_; // cost for this operator
double card_; // cardinality
@ -2224,7 +2224,7 @@ class ObLogicalOperator {
uint64_t dblink_id_;
int64_t plan_depth_;
private:
private:
// unify to use get, set and reset function instead of using op_ordering_
bool is_at_most_one_row_;
common::ObSEArray<OrderItem, 8, common::ModulePageAllocator, true> op_ordering_;

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObMergeLogPlan : public ObInsertLogPlan {
public:
public:
ObMergeLogPlan(ObOptimizerContext& ctx, const ObDMLStmt* merge_stmt) : ObInsertLogPlan(ctx, merge_stmt)
{}
virtual ~ObMergeLogPlan()
@ -26,7 +26,7 @@ class ObMergeLogPlan : public ObInsertLogPlan {
int generate_raw_plan();
virtual int generate_plan();
private:
private:
int allocate_merge_operator_as_top(ObLogicalOperator*& top);
int allocate_merge_subquery();
int get_update_insert_condition_subquery(ObRawExpr* matched_expr, ObRawExpr* null_expr, bool& update_has_subquery,

View File

@ -77,7 +77,7 @@ struct ObTableMetaInfo {
bool is_only_memtable_data_; // whether has only memtable data
EstimatedPartition table_est_part_;
ObEstimateType cost_est_type_; // cost estimation type
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObTableMetaInfo);
};
@ -106,7 +106,7 @@ struct ObIndexMetaInfo {
bool is_index_back_; // is index back
bool is_unique_index_; // is unique index
bool is_global_index_; // whether is global index
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObIndexMetaInfo);
};
@ -208,7 +208,7 @@ struct ObCostTableScanInfo {
common::ObSimpleBatch::ObBatchType batch_type_;
SampleInfo sample_info_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObCostTableScanInfo);
};
@ -241,7 +241,7 @@ struct ObCostBaseJoinInfo : public ObTwoChildrenNodeCostInfo {
const common::ObIArray<ObRawExpr*>& other_join_condition_;
ObEstSelInfo* est_sel_info_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObCostBaseJoinInfo);
};
@ -265,7 +265,7 @@ struct ObCostNLJoinInfo : public ObCostBaseJoinInfo {
bool with_nl_param_;
bool need_mat_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObCostNLJoinInfo);
};
@ -287,7 +287,7 @@ struct ObCostMergeJoinInfo : public ObCostBaseJoinInfo {
const common::ObIArray<OrderItem>& left_need_ordering_;
const common::ObIArray<OrderItem>& right_need_ordering_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObCostMergeJoinInfo);
};
@ -306,7 +306,7 @@ struct ObCostHashJoinInfo : public ObCostBaseJoinInfo {
K_(left_ids), K_(right_ids), K_(join_type), K_(equal_join_condition), K_(other_join_condition));
virtual ~ObCostHashJoinInfo(){};
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObCostHashJoinInfo);
};
@ -365,7 +365,7 @@ struct ObSortCostInfo {
};
class ObOptEstCost {
public:
public:
const static int64_t MAX_STORAGE_RANGE_ESTIMATION_NUM;
struct ObCostParams {
@ -585,7 +585,7 @@ class ObOptEstCost {
ObIArray<ObExprSelPair>* all_predicate_sel, double& output_row_count, double& query_range_row_count,
double& phy_query_range_row_count, double& index_back_row_count);
private:
private:
static int cost_prefix_sort(const ObSortCostInfo& cost_info, const ObIArray<ObRawExpr*>& order_exprs, double& cost);
static int cost_topn_sort(const ObSortCostInfo& cost_info, const ObIArray<ObExprResType>& types, double& cost);
static int cost_topn_sort_inner(const ObIArray<ObExprResType>& types, double rows, double n, double& cost);
@ -640,7 +640,7 @@ class ObOptEstCost {
const static double hash_params_[common::ObMaxTC + 1];
const static ObCostParams cost_params_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObOptEstCost);
};

View File

@ -60,7 +60,7 @@ enum ObEstimateType {
};
class ObEstColumnStat {
public:
public:
int assign(const ObEstColumnStat& other);
int init(const uint64_t column_id, const double rows, const int64_t ndv, const bool is_single_pkey);
@ -93,14 +93,14 @@ class ObEstColumnStat {
TO_STRING_KV(K_(column_id), K_(ndv), K_(origin_ndv));
private:
private:
uint64_t column_id_;
double ndv_;
double origin_ndv_;
};
class ObEstTableStat {
public:
public:
int assign(const ObEstTableStat& other);
int init(const uint64_t table_id, const ObPartitionKey& pkey, const int32_t rel_id, const double rows,
@ -185,7 +185,7 @@ class ObEstTableStat {
TO_STRING_KV(
K_(table_id), K_(ref_id), K_(rel_id), K_(rows), K_(origin_rows), K_(all_used_parts), K_(pk_ids), K_(all_cstat));
private:
private:
uint64_t table_id_;
uint64_t ref_id_;
int64_t part_id_; // best_partition id
@ -199,7 +199,7 @@ class ObEstTableStat {
};
class ObEstAllTableStat {
public:
public:
int assign(const ObEstAllTableStat& other);
/**
@ -247,7 +247,7 @@ class ObEstAllTableStat {
TO_STRING_KV(K_(all_tstat));
private:
private:
common::ObSEArray<ObEstTableStat, 8, common::ModulePageAllocator, true> all_tstat_;
};
@ -279,7 +279,7 @@ struct ObEstColRangeInfo {
};
class ObEstSelInfo {
public:
public:
ObEstSelInfo(ObOptimizerContext& ctx, ObDMLStmt* stmt, const ObLogicalOperator* op = NULL)
: opt_ctx_(ctx), stmt_(stmt), op_(op), use_origin_stat_(false)
{}
@ -389,7 +389,7 @@ class ObEstSelInfo {
}
TO_STRING_KV(K_(table_stats));
private:
private:
ObOptimizerContext& opt_ctx_;
ObDMLStmt* stmt_;
// in join order, op_ is NULL
@ -399,7 +399,7 @@ class ObEstSelInfo {
bool use_origin_stat_;
};
class ObOptEstSel {
public:
public:
static double DEFAULT_COLUMN_DISTINCT_RATIO;
// calculate selectivity for predicates with conjective relationship
@ -440,7 +440,7 @@ class ObOptEstSel {
return num < 0 ? 0 : (num > 1 ? 1 : num);
}
private:
private:
struct RangeSel {
RangeSel() : var_(NULL), has_lt_(false), has_gt_(false), lt_sel_(0), gt_sel_(0)
{}
@ -479,7 +479,7 @@ class ObOptEstSel {
double gt_sel_;
};
private:
private:
// use real params to calc selectivity
// @param in plan the plan
// @param in qual the filter to calc selectivity, should be const or calculable expr
@ -692,7 +692,7 @@ class ObOptEstSel {
return fabs(num) < OB_DOUBLE_EPSINON;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObOptEstSel);
};
} // namespace sql

View File

@ -35,7 +35,7 @@ struct RangeExprs {
};
class ObOptEstUtils {
public:
public:
// check if op is monotonic, some type may not considered.
static bool is_monotonic_op(const ObItemType type);
@ -91,7 +91,7 @@ class ObOptEstUtils {
};
class ObOptEstObjToScalar {
public:
public:
// Functionality: convert objs to scalars(double).
// One Optimization : Limited precision of double type cannot distinguish long strs using
// a static base of 256 (max distinguishable length is 6). We need to firstly truncate the
@ -120,7 +120,7 @@ class ObOptEstObjToScalar {
static int convert_string_to_scalar_for_number(const common::ObString& str, double& scala);
private:
private:
static int add_to_string_conversion_array(
const common::ObObj& strobj, common::ObIArray<common::ObString>& arr, uint64_t& convertable_map, int64_t pos);
// 1, find common prefix length of strings

View File

@ -121,7 +121,7 @@ struct NumberingCtx {
};
struct NumberingExchangeCtx {
private:
private:
struct IdStruct {
IdStruct() : current_px_id_(common::OB_INVALID_ID), next_dfo_id_(common::OB_INVALID_ID)
{}
@ -132,7 +132,7 @@ struct NumberingExchangeCtx {
TO_STRING_KV(K_(current_px_id), K_(next_dfo_id));
};
public:
public:
NumberingExchangeCtx() : next_px_id_(common::OB_INVALID_ID), ids_()
{}
int64_t next_px()
@ -163,7 +163,7 @@ struct NumberingExchangeCtx {
return ids_.pop_back(dummy);
}
private:
private:
int64_t next_px_id_;
common::ObSEArray<IdStruct, 4> ids_;
};
@ -189,7 +189,7 @@ struct ObExprSelPair {
};
class ObOptimizer {
public:
public:
ObOptimizer(ObOptimizerContext& ctx) : ctx_(ctx)
{}
virtual ~ObOptimizer()
@ -197,7 +197,7 @@ class ObOptimizer {
virtual int optimize(ObDMLStmt& stmt, ObLogPlan*& plan);
virtual int get_optimization_cost(ObDMLStmt& stmt, double& cost);
private:
private:
int generate_plan_for_temp_table(ObDMLStmt& stmt);
int init_env_info(ObDMLStmt& stmt);
int get_stmt_max_table_dop(ObDMLStmt& stmt, int64_t& max_dop);
@ -207,7 +207,7 @@ class ObOptimizer {
int check_pdml_supported_feature(const ObDMLStmt& stmt, const ObSQLSessionInfo& session, bool& is_use_pdml);
int check_unique_index(const common::ObIArray<ObColumnRefRawExpr*>& column_exprs, bool& has_unique_index) const;
private:
private:
ObOptimizerContext& ctx_;
DISALLOW_COPY_AND_ASSIGN(ObOptimizer);
};

View File

@ -30,7 +30,7 @@ class ObLogPlanFactory;
enum PXParallelRule { USE_PX_DEFAULT, MANUAL_HINT, SESSION_FORCE_PARALLEL, MANUAL_TABLE_DOP, MAX_OPTION };
class ObOptimizerContext {
public:
public:
ObOptimizerContext(ObSQLSessionInfo* session_info, ObExecContext* exec_ctx, ObSqlSchemaGuard* sql_schema_guard,
common::ObStatManager* stat_manager, common::ObOptStatManager* opt_stat_manager,
storage::ObPartitionService* partition_service, common::ObIAllocator& allocator,
@ -294,7 +294,7 @@ class ObOptimizerContext {
return parallel_ > 1;
}
private:
private:
ObSQLSessionInfo* session_info_;
ObExecContext* exec_ctx_;
ObSqlSchemaGuard* sql_schema_guard_;

View File

@ -18,7 +18,7 @@
namespace oceanbase {
namespace sql {
class ObOptimizerPartitionLocationCache : public share::ObIPartitionLocationCache {
public:
public:
static const int64_t LOCATION_CACHE_BUCKET_NUM = 32;
ObOptimizerPartitionLocationCache(common::ObIAllocator& allocator, share::ObIPartitionLocationCache* location_cache);
virtual ~ObOptimizerPartitionLocationCache();
@ -75,10 +75,10 @@ class ObOptimizerPartitionLocationCache : public share::ObIPartitionLocationCach
return location_cache_;
}
private:
private:
int insert_or_replace_optimizer_cache(share::ObLocationCacheKey& key, share::ObPartitionLocation* location);
private:
private:
typedef common::hash::ObHashMap<share::ObLocationCacheKey, share::ObPartitionLocation*,
common::hash::NoPthreadDefendMode>
PartitionLocationMap;
@ -86,7 +86,7 @@ class ObOptimizerPartitionLocationCache : public share::ObIPartitionLocationCach
share::ObIPartitionLocationCache* location_cache_;
PartitionLocationMap optimizer_cache_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObOptimizerPartitionLocationCache);
};

View File

@ -53,7 +53,7 @@ class ObShardingInfo;
class ObTablePartitionInfo;
struct SubPlanInfo;
class ObOptimizerUtil {
public:
public:
static int is_prefix_ordering(const common::ObIArray<OrderItem>& pre, const common::ObIArray<OrderItem>& full,
const EqualSets& equal_sets, const common::ObIArray<ObRawExpr*>& const_exprs, bool& is_prefix);
@ -668,7 +668,7 @@ class ObOptimizerUtil {
static int check_pushdown_filter_to_base_table(ObLogPlan& plan, const uint64_t table_id,
const ObIArray<ObRawExpr*>& pushdown_filters, const ObIArray<ObRawExpr*>& restrict_infos, bool& can_pushdown);
private:
private:
// disallow construct
ObOptimizerUtil();
~ObOptimizerUtil();

View File

@ -22,7 +22,7 @@ namespace sql {
class ObOptPartLoc {
OB_UNIS_VERSION(1);
// friend class ObPartitionReplicaLocation;
public:
public:
typedef common::ObSEArray<ObRoutePolicy::CandidateReplica, common::OB_MAX_MEMBER_NUMBER, common::ModulePageAllocator,
true>
ObSmartReplicaLocationArray;
@ -88,7 +88,7 @@ class ObOptPartLoc {
TO_STRING_KV(KT_(table_id), K_(partition_id), K_(partition_cnt), K_(pg_key), K_(replica_locations), K_(renew_time),
K_(is_mark_fail));
private:
private:
uint64_t table_id_;
int64_t partition_id_;
int64_t partition_cnt_;
@ -99,7 +99,7 @@ class ObOptPartLoc {
};
class ObPhyPartitionLocationInfo {
public:
public:
ObPhyPartitionLocationInfo();
virtual ~ObPhyPartitionLocationInfo();
@ -144,14 +144,14 @@ class ObPhyPartitionLocationInfo {
bool is_server_in_replica(const common::ObAddr& server, int64_t& idx) const;
TO_STRING_KV(K_(partition_location), K_(selected_replica_idx), K_(priority_replica_idxs));
private:
private:
ObOptPartLoc partition_location_;
int64_t selected_replica_idx_;
common::ObSEArray<int64_t, 2, common::ModulePageAllocator, true> priority_replica_idxs_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObPhyPartitionLocationInfo);
};
@ -160,11 +160,11 @@ typedef common::ObSEArray<ObPhyPartitionLocationInfo, 2, common::ModulePageAlloc
ObPhyPartitionLocationInfoSEArray;
class ObPhyTableLocationInfo {
public:
public:
ObPhyTableLocationInfo();
virtual ~ObPhyTableLocationInfo();
public:
public:
void reset();
int assign(const ObPhyTableLocationInfo& other);
@ -236,7 +236,7 @@ class ObPhyTableLocationInfo {
TO_STRING_KV(K_(table_location_key), K_(ref_table_id), K_(phy_part_loc_info_list), K_(splitted_range_list),
K_(duplicate_type));
private:
private:
uint64_t table_location_key_;
uint64_t ref_table_id_;
@ -248,7 +248,7 @@ class ObPhyTableLocationInfo {
ObDuplicateType duplicate_type_;
private:
private:
/* functions */
/* variables */
DISALLOW_COPY_AND_ASSIGN(ObPhyTableLocationInfo);

View File

@ -74,7 +74,7 @@ struct PwjTable {
typedef common::hash::ObHashMap<uint64_t, PartitionIdArray, common::hash::NoPthreadDefendMode> PWJPartitionIdMap;
class ObPwjComparer {
public:
public:
ObPwjComparer(bool is_strict)
: is_strict_(is_strict),
pwj_tables_(),
@ -182,7 +182,7 @@ class ObPwjComparer {
TO_STRING_KV(K_(is_strict), K_(pwj_tables), K_(partition_id_group));
private:
private:
bool is_strict_;
common::ObSEArray<PwjTable, 32, common::ModulePageAllocator, true> pwj_tables_;
common::ObSEArray<std::pair<int64_t, int64_t>, 32, common::ModulePageAllocator, true> part_id_map_;

View File

@ -25,7 +25,7 @@ namespace sql {
template <class T>
class DfoTreeNormalizer {
public:
public:
static int normalize(T& root);
};
@ -98,7 +98,7 @@ int DfoTreeNormalizer<T>::normalize(T& root)
}
class SchedOrderGenerator {
public:
public:
SchedOrderGenerator() = default;
~SchedOrderGenerator() = default;
int generate(DfoInfo& root, ObIArray<DfoInfo*>& edges);

View File

@ -127,12 +127,12 @@ struct PxInfo {
};
class ObPxResourceAnalyzer {
public:
public:
ObPxResourceAnalyzer();
~ObPxResourceAnalyzer() = default;
int analyze(ObLogicalOperator& root_op, int64_t& max_parallel_thread_group_count);
private:
private:
int convert_log_plan_to_nested_px_tree(common::ObIArray<PxInfo>& px_trees, ObLogicalOperator& root_op);
int create_dfo_tree(ObIArray<PxInfo>& px_trees, ObLogExchange& root_op);
int do_split(common::ObIArray<PxInfo>& px_trees, PxInfo& px_info, ObLogicalOperator& root_op, DfoInfo* parent_dfo);
@ -140,7 +140,7 @@ class ObPxResourceAnalyzer {
int walk_through_dfo_tree(PxInfo& px_root, int64_t& max_parallel_thread_group_count);
int create_dfo(DfoInfo*& dfo, int64_t dop);
private:
private:
/* variables */
common::ObArenaAllocator dfo_allocator_;
DISALLOW_COPY_AND_ASSIGN(ObPxResourceAnalyzer);

View File

@ -23,7 +23,7 @@ namespace sql {
* during output expr allocation.
*/
class ObRawExprAddToContext : public ObRawExprVisitor {
public:
public:
ObRawExprAddToContext(common::ObIArray<ExprProducer>* ctx, uint64_t id)
: ctx_(ctx), consumer_id_(id), keep_working_(true)
{}
@ -48,13 +48,13 @@ class ObRawExprAddToContext : public ObRawExprVisitor {
virtual int visit(ObWinFunRawExpr& expr);
virtual int visit(ObPseudoColumnRawExpr& expr);
private:
private:
int add_expr(ObRawExpr& expr);
// types and constants
private:
private:
// function members
private:
private:
common::ObIArray<ExprProducer>* ctx_;
uint64_t consumer_id_;
bool keep_working_;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObRawExpr;
class ObRawExprCheckDep {
public:
public:
ObRawExprCheckDep(
common::ObIArray<ObRawExpr*>& dep_exprs, common::ObBitSet<common::OB_MAX_BITSET_SIZE>& deps, bool is_access)
: dep_exprs_(dep_exprs), dep_indices_(&deps), is_access_(is_access)
@ -37,10 +37,10 @@ class ObRawExprCheckDep {
return dep_indices_;
}
private:
private:
int check_expr(const ObRawExpr& expr, bool& found);
private:
private:
common::ObIArray<ObRawExpr*>& dep_exprs_;
common::ObBitSet<common::OB_MAX_BITSET_SIZE>* dep_indices_;
bool is_access_; // mark whether we are do project pruning for access exprs

View File

@ -18,7 +18,7 @@ namespace oceanbase {
namespace sql {
class ObRawConnectByLevelVisitor : public ObRawExprVisitor {
public:
public:
ObRawConnectByLevelVisitor() : level_exprs_(nullptr){};
virtual ~ObRawConnectByLevelVisitor() = default;
@ -50,7 +50,7 @@ class ObRawConnectByLevelVisitor : public ObRawExprVisitor {
virtual int visit(ObWinFunRawExpr& expr);
virtual int visit(ObPseudoColumnRawExpr& expr);
private:
private:
common::ObIArray<ObRawExpr*>* level_exprs_;
};

View File

@ -23,7 +23,7 @@ namespace sql {
* during output expr allocation.
*/
class ObRawExprGetHashValue : public ObRawExprVisitor {
public:
public:
ObRawExprGetHashValue(uint64_t seed) : seed_(seed)
{}
virtual ~ObRawExprGetHashValue()
@ -45,10 +45,10 @@ class ObRawExprGetHashValue : public ObRawExprVisitor {
virtual int visit(ObSysFunRawExpr& expr);
virtual int visit(ObSetOpRawExpr& expr);
private:
private:
int add_expr(ObRawExpr& expr);
private:
private:
uint64_t seed_;
// disallow copy
DISALLOW_COPY_AND_ASSIGN(ObRawExprGetHashValue);

View File

@ -23,7 +23,7 @@ namespace sql {
* during output expr allocation.
*/
class ObRawExprPullUpAggrExpr : public ObRawExprVisitor {
public:
public:
ObRawExprPullUpAggrExpr(ObRawExprFactory& expr_factory, const ObSQLSessionInfo* session_info)
: expr_factory_(expr_factory),
new_expr_(NULL),
@ -68,7 +68,7 @@ class ObRawExprPullUpAggrExpr : public ObRawExprVisitor {
return merge_synopsis_;
}
private:
private:
// ObIArray<ExprProducer> *ctx_;
// uint64_t consumer_id_;
// disallow copy

View File

@ -24,7 +24,7 @@ class ObStmt;
* during output expr allocation.
*/
class ObRawExprPushDownAggrExpr : public ObRawExprVisitor {
public:
public:
ObRawExprPushDownAggrExpr(const ObSQLSessionInfo* session_info, ObRawExprFactory& expr_factory)
: session_info_(session_info), expr_factory_(expr_factory), push_down_avg_expr_(NULL)
{}
@ -60,7 +60,7 @@ class ObRawExprPushDownAggrExpr : public ObRawExprVisitor {
return new_exprs_.count();
}
private:
private:
const ObSQLSessionInfo* session_info_;
ObRawExprFactory& expr_factory_;
common::ObSEArray<ObRawExpr*, 4, common::ModulePageAllocator, true> new_exprs_;

View File

@ -17,11 +17,11 @@
namespace oceanbase {
namespace sql {
class ObReplicaCompare {
public:
public:
enum CompareType { IS_OTHER_REGION, ZONE_TYPE, MERGE_STATUS, POS_TYPE, CMP_CNT };
enum CompareRes { EQUAL, LESS, GREATER };
public:
public:
explicit ObReplicaCompare(ObRoutePolicyType policy_type);
virtual ~ObReplicaCompare()
{}
@ -43,7 +43,7 @@ class ObReplicaCompare {
typedef CompareRes (ObReplicaCompare::*CmpFuncPtr)(
const ObRoutePolicy::CandidateReplica& replica1, const ObRoutePolicy::CandidateReplica& replica2);
private:
private:
int ret_;
ObRoutePolicyType policy_type_;
CmpFuncPtr cmp_func_array_[CMP_CNT];

View File

@ -52,7 +52,7 @@ struct ObRoutePolicyCtx {
};
class ObRoutePolicy {
public:
public:
enum PositionType {
SAME_SERVER = 0,
SAME_IDC = 1,
@ -66,7 +66,7 @@ class ObRoutePolicy {
MERGE_STATUS_MAX,
};
class ReplicaAttribute {
public:
public:
ReplicaAttribute()
: pos_type_(POSITION_TYPE_MAX),
merge_status_(MERGE_STATUS_MAX),
@ -113,7 +113,7 @@ class ObRoutePolicy {
share::ObServerStatus::DisplayStatus server_status_;
};
class CandidateReplica final : public share::ObReplicaLocation {
public:
public:
CandidateReplica() : ObReplicaLocation(), attr_(), is_filter_(false), replica_idx_(common::OB_INVALID_INDEX)
{}
CandidateReplica(const share::ObReplicaLocation& replica_location)
@ -143,14 +143,14 @@ class ObRoutePolicy {
return ret;
}
public:
public:
TO_STRING_KV(K(server_), K(role_), K(sql_port_), K(replica_type_), K(attr_), K(is_filter_), K(replica_idx_));
ReplicaAttribute attr_;
bool is_filter_;
int64_t replica_idx_; // invalid
};
public:
public:
ObRoutePolicy(const common::ObAddr& addr, storage::ObPartitionService& part_service)
: local_addr_(addr),
local_locality_(),
@ -185,7 +185,7 @@ class ObRoutePolicy {
static bool is_same_idc(const share::ObServerLocality& locality1, const share::ObServerLocality& locality2);
static bool is_same_region(const share::ObServerLocality& locality1, const share::ObServerLocality& locality2);
protected:
protected:
int init_candidate_replica(
const common::ObIArray<share::ObServerLocality>& server_locality_array, CandidateReplica& candi_replica);
int calc_position_type(const share::ObServerLocality& candi_locality, CandidateReplica& candi_replica);
@ -213,7 +213,7 @@ class ObRoutePolicy {
return type;
}
protected:
protected:
common::ObAddr local_addr_;
share::ObServerLocality local_locality_;
common::ObSEArray<share::ObServerLocality, 32> server_locality_array_;

View File

@ -34,7 +34,7 @@ struct MergeKeyInfo;
class ObSelectLogPlan : public ObLogPlan {
friend class ::test::ObLogPlanTest_ob_explain_test_Test;
public:
public:
ObSelectLogPlan(ObOptimizerContext& ctx, const ObSelectStmt* select_stmt);
virtual ~ObSelectLogPlan();
@ -66,7 +66,7 @@ class ObSelectLogPlan : public ObLogPlan {
return const_cast<ObSelectStmt*>(static_cast<const ObSelectLogPlan&>(*this).get_stmt());
}
private:
private:
// @brief Allocate a hash group by on top of a plan tree
// ObLogicalOperator * candi_allocate_hash_group_by();
@ -175,7 +175,7 @@ class ObSelectLogPlan : public ObLogPlan {
int allocate_distinct_as_top(ObLogicalOperator*& top, const AggregateAlgo algo, ObIArray<ObRawExpr*>& distinct_exprs,
const ObIArray<OrderItem>& expected_ordering);
private:
private:
int decide_sort_keys_for_runion(
const common::ObIArray<OrderItem>& order_items, common::ObIArray<OrderItem>& new_order_items);
int init_merge_set_structure(common::ObIAllocator& allocator, const common::ObIArray<CandidatePlan>& plans,

View File

@ -282,13 +282,10 @@ int ObShardingInfo::is_compatible_partition_key(const common::ObIArray<ObRawExpr
return ret;
}
int ObShardingInfo::check_if_match_partition_wise(ObLogPlan &log_plan __attribute__((unused)),
const EqualSets &equal_sets,
const common::ObIArray<ObRawExpr*> &left_keys,
const common::ObIArray<ObRawExpr*> &right_keys,
const ObShardingInfo &left_sharding,
const ObShardingInfo &right_sharding,
bool &is_partition_wise)
int ObShardingInfo::check_if_match_partition_wise(ObLogPlan& log_plan __attribute__((unused)),
const EqualSets& equal_sets, const common::ObIArray<ObRawExpr*>& left_keys,
const common::ObIArray<ObRawExpr*>& right_keys, const ObShardingInfo& left_sharding,
const ObShardingInfo& right_sharding, bool& is_partition_wise)
{
int ret = OB_SUCCESS;
bool is_key_covered = false;
@ -388,10 +385,8 @@ int ObShardingInfo::check_if_match_repart(const EqualSets& equal_sets, const ObI
return ret;
}
int ObShardingInfo::is_physically_equal_partitioned(ObLogPlan &log_plan __attribute__((unused)),
const ObShardingInfo &left_sharding,
const ObShardingInfo &right_sharding,
bool &is_physical_equal)
int ObShardingInfo::is_physically_equal_partitioned(ObLogPlan& log_plan __attribute__((unused)),
const ObShardingInfo& left_sharding, const ObShardingInfo& right_sharding, bool& is_physical_equal)
{
int ret = OB_SUCCESS;
ret = is_physically_equal_partitioned(left_sharding, right_sharding, is_physical_equal);

View File

@ -33,7 +33,7 @@ typedef common::ObSEArray<ObRawExprSet*, 8, common::ModulePageAllocator, true> O
typedef ObRawExprSets EqualSets;
class ObShardingInfo {
public:
public:
ObShardingInfo()
: part_level_(share::schema::PARTITION_LEVEL_ZERO),
part_func_type_(share::schema::PARTITION_FUNC_TYPE_MAX),
@ -260,7 +260,7 @@ class ObShardingInfo {
K_(part_func_type), K_(subpart_func_type), K_(part_num), K_(subpart_num), K_(location_type),
K_(can_reselect_replica), K_(phy_table_location_info));
private:
private:
int set_partition_key(ObRawExpr* part_expr, const share::schema::ObPartitionFuncType part_func_type,
common::ObIArray<ObRawExpr*>& partition_keys);
@ -275,7 +275,7 @@ class ObShardingInfo {
static int is_compatible_partition_key(const common::ObIArray<ObRawExpr*>& first_part_keys,
const common::ObIArray<ObRawExpr*>& second_part_keys, bool& is_compatible);
private:
private:
share::schema::ObPartitionLevel part_level_;
share::schema::ObPartitionFuncType part_func_type_;

View File

@ -28,7 +28,7 @@ class ObRawExpr;
*/
class ObSkylineDim {
public:
public:
enum Dimension {
INDEX_BACK = 0,
INTERESTING_ORDER,
@ -58,12 +58,12 @@ class ObSkylineDim {
;
TO_STRING_KV(K(dim_type_));
private:
private:
const Dimension dim_type_;
};
class ObIndexBackDim : public ObSkylineDim {
public:
public:
ObIndexBackDim()
: ObSkylineDim(INDEX_BACK),
need_index_back_(false),
@ -98,7 +98,7 @@ class ObIndexBackDim : public ObSkylineDim {
TO_STRING_KV(K_(need_index_back), K_(has_interesting_order), K_(can_extract_range), K_(index_column_cnt),
"restrcit_ids", common::ObArrayWrap<uint64_t>(filter_column_ids_, filter_column_cnt_));
private:
private:
bool need_index_back_;
bool has_interesting_order_;
bool can_extract_range_;
@ -117,7 +117,7 @@ class ObIndexBackDim : public ObSkylineDim {
* we save the column_ids that can be use
*/
class ObInterestOrderDim : public ObSkylineDim {
public:
public:
ObInterestOrderDim()
: ObSkylineDim(INTERESTING_ORDER),
is_interesting_order_(false),
@ -152,7 +152,7 @@ class ObInterestOrderDim : public ObSkylineDim {
K_(filter_column_cnt), "filter column_ids",
common::ObArrayWrap<uint64_t>(filter_column_ids_, filter_column_cnt_));
private:
private:
bool is_interesting_order_;
int64_t column_cnt_;
uint64_t column_ids_[common::OB_USER_MAX_ROWKEY_COLUMN_NUMBER];
@ -172,7 +172,7 @@ class ObInterestOrderDim : public ObSkylineDim {
* id in ascending order, for quick compare
*/
class ObQueryRangeDim : public ObSkylineDim {
public:
public:
ObQueryRangeDim() : ObSkylineDim(QUERY_RANGE), column_cnt_(0)
{
MEMSET(column_ids_, 0, sizeof(uint64_t) * common::OB_USER_MAX_ROWKEY_COLUMN_NUMBER);
@ -183,7 +183,7 @@ class ObQueryRangeDim : public ObSkylineDim {
int add_rowkey_ids(const common::ObIArray<uint64_t>& column_ids);
TO_STRING_KV(K_(column_cnt), "rowkey_ids", common::ObArrayWrap<uint64_t>(column_ids_, column_cnt_));
private:
private:
int64_t column_cnt_;
uint64_t column_ids_[common::OB_USER_MAX_ROWKEY_COLUMN_NUMBER];
};
@ -198,14 +198,14 @@ struct KeyPrefixComp {
return status_;
}
private:
private:
static int do_compare(const uint64_t* left, const int64_t left_cnt, const uint64_t* right, const bool* right_const,
const int64_t right_cnt, ObSkylineDim::CompareStat& status);
ObSkylineDim::CompareStat status_;
};
struct RangeSubsetComp {
public:
public:
RangeSubsetComp() : status_(ObSkylineDim::UNCOMPARABLE)
{}
int operator()(const uint64_t* left, const int64_t left_cnt, const uint64_t* right, const int64_t right_cnt);
@ -214,7 +214,7 @@ struct RangeSubsetComp {
return status_;
}
private:
private:
static int do_compare(const uint64_t* left, const int64_t left_cnt, const uint64_t* right, const int64_t right_cnt,
ObSkylineDim::CompareStat& status);
ObSkylineDim::CompareStat status_;
@ -222,7 +222,7 @@ struct RangeSubsetComp {
// dimension for each index
class ObIndexSkylineDim {
public:
public:
ObIndexSkylineDim() : index_id_(common::OB_INVALID_ID), dim_count_(ObSkylineDim::DIM_COUNT), can_prunning_(true)
{
MEMSET(skyline_dims_, 0, sizeof(const ObSkylineDim*) * ObSkylineDim::DIM_COUNT);
@ -256,7 +256,7 @@ class ObIndexSkylineDim {
TO_STRING_KV(
K_(index_id), K_(dim_count), "dims", common::ObArrayWrap<const ObSkylineDim*>(skyline_dims_, dim_count_));
private:
private:
uint64_t index_id_;
const int64_t dim_count_;
bool can_prunning_; // whether this index can prunning other index or not
@ -264,7 +264,7 @@ class ObIndexSkylineDim {
};
class ObSkylineDimRecorder {
public:
public:
ObSkylineDimRecorder()
{}
virtual ~ObSkylineDimRecorder()
@ -279,17 +279,17 @@ class ObSkylineDimRecorder {
static int extract_column_ids(
const common::ObIArray<ObRawExpr*>& keys, const int64_t prefix_count, common::ObIArray<uint64_t>& column_ids);
private:
private:
common::ObArray<const ObIndexSkylineDim*> index_dims_;
};
class ObSkylineDimFactory {
public:
public:
static ObSkylineDimFactory& get_instance();
template <typename SkylineDimType>
int create_skyline_dim(common::ObIAllocator& allocator, SkylineDimType*& skyline_dim);
private:
private:
ObSkylineDimFactory()
{}
DISALLOW_COPY_AND_ASSIGN(ObSkylineDimFactory);

View File

@ -31,18 +31,18 @@ class ObColumnRefRawExpr;
class ObExprEqualCheckContext;
typedef common::ObSEArray<int64_t, 1> RowkeyArray;
class ObPartIdRowMapManager {
public:
public:
ObPartIdRowMapManager() : manager_(), part_idx_(common::OB_INVALID_INDEX)
{}
typedef common::ObSEArray<int64_t, 12> ObRowIdList;
struct MapEntry {
public:
public:
MapEntry() : list_()
{}
TO_STRING_KV(K_(list));
int assign(const MapEntry& entry);
public:
public:
ObRowIdList list_;
};
typedef common::ObSEArray<MapEntry, 1> ObPartRowManager;
@ -76,12 +76,12 @@ class ObPartIdRowMapManager {
}
TO_STRING_KV(K_(manager), K_(part_idx));
private:
private:
ObPartRowManager manager_;
int64_t part_idx_; // used for parameter pass only.
common::ObNewRow part_row_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObPartIdRowMapManager);
};
@ -337,7 +337,7 @@ struct TableLocationKey {
class ObOptimizerContext;
class ObTableLocation {
public:
public:
enum TablePartType {
NONE,
HASH,
@ -357,7 +357,7 @@ class ObTableLocation {
class PartProjector {
OB_UNIS_VERSION(1);
public:
public:
PartProjector(common::ObIAllocator& allocator, ObSqlExpressionFactory& sql_expr_factory,
ObExprOperatorFactory& expr_op_factory)
: allocator_(allocator), sql_expr_factory_(sql_expr_factory), expr_op_factory_(expr_op_factory)
@ -388,11 +388,11 @@ class ObTableLocation {
common::ObArrayWrap<int32_t>(part_projector_, part_projector_size_), "subpart_projector",
common::ObArrayWrap<int32_t>(subpart_projector_, subpart_projector_size_));
private:
private:
int init_part_projector(
const ObRawExpr* part_expr, RowDesc& row_desc, int32_t*& projector, int64_t& projector_size);
private:
private:
common::ObDList<ObSqlExpression> virtual_column_exprs_;
int64_t column_cnt_;
int32_t* part_projector_;
@ -415,7 +415,7 @@ class ObTableLocation {
ObExecContext& exec_ctx, const uint64_t ref_table_id, common::ObIArray<int64_t>* partition_ids, int64_t* fake_id);
OB_UNIS_VERSION(1);
public:
public:
// for array: new(&data_[count_]) T();
// for normal usage, like plan set
ObTableLocation()
@ -841,7 +841,7 @@ class ObTableLocation {
TO_STRING_KV(K_(table_id), K_(ref_table_id), K_(part_num), K_(is_global_index), K_(duplicate_type),
K_(part_expr_param_idxs), K_(part_projector), K_(part_expr), K_(gen_col_expr));
private:
private:
// get partition columns and generate partition_expr_
// partition_columns:partition columns
// gen_cols: columns dependented by generated partition column
@ -1037,7 +1037,7 @@ class ObTableLocation {
int recursive_convert_generated_column(const ObIArray<ObColumnRefRawExpr*>& table_column,
const ObIArray<ObRawExpr*>& column_conv_exprs, ObRawExpr*& expr);
private:
private:
bool inited_;
uint64_t table_id_;
uint64_t ref_table_id_;

View File

@ -21,7 +21,7 @@ namespace oceanbase {
namespace sql {
class ObTablePartitionInfo {
public:
public:
ObTablePartitionInfo()
: inner_allocator_(common::ObModIds::OB_SQL_TABLE_LOCATION),
allocator_(inner_allocator_),
@ -115,10 +115,10 @@ class ObTablePartitionInfo {
}
TO_STRING_KV(K_(table_location), K_(phy_tbl_location_info));
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObTablePartitionInfo);
private:
private:
/**
* ObTableLocation is the structure we stored to calculate the physical table location,
* which is represented by ObPhyTableLocation, for a given table(logical) in a given statement.

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace sql {
class ObLogUpdate;
class ObUpdateLogPlan : public ObLogPlan {
public:
public:
ObUpdateLogPlan(ObOptimizerContext& ctx, const ObUpdateStmt* update_stmt) : ObLogPlan(ctx, update_stmt)
{}
virtual ~ObUpdateLogPlan(){};
@ -31,7 +31,7 @@ class ObUpdateLogPlan : public ObLogPlan {
*/
int generate_plan();
private:
private:
int allocate_update_as_top(ObLogicalOperator*& top);
int allocate_pdml_update_as_top(ObLogicalOperator*& top);
@ -47,7 +47,7 @@ class ObUpdateLogPlan : public ObLogPlan {
DISALLOW_COPY_AND_ASSIGN(ObUpdateLogPlan);
private:
private:
};
} // namespace sql
} // namespace oceanbase