[FEAT MERGE] impl vectorization 2.0

Co-authored-by: oceanoverflow <oceanoverflow@gmail.com>
Co-authored-by: hezuojiao <hezuojiao@gmail.com>
Co-authored-by: Monk-Liu <1152761042@qq.com>
This commit is contained in:
obdev
2024-02-08 05:32:52 +00:00
committed by ob-robot
parent 64a276a23f
commit 0d0b11c0cc
592 changed files with 358124 additions and 303277 deletions

View File

@ -392,12 +392,23 @@ public:
int64_t multi_child_op_above_count_in_dfo_;
};
class AllocMDContext
class AllocOpContext
{
public:
AllocMDContext() : org_op_id_(0) {};
~AllocMDContext() = default;
int64_t org_op_id_;
AllocOpContext() :
visited_map_(), disabled_op_set_(), gen_temp_op_id_(false), next_op_id_(0) {}
~AllocOpContext();
int init();
int visit(uint64_t op_id, uint8_t flag);
bool is_visited(uint64_t op_id, uint8_t flag);
// For the `blocking` hint, there are different insertion levels. We need to ensure that
// when multiple insertion levels exist, material ops will not be inserted repeatedly.
hash::ObHashMap<uint8_t, ObSEArray<uint64_t, 8>> visited_map_; // key:flag, value:op ids
hash::ObHashSet<uint64_t> disabled_op_set_;
bool gen_temp_op_id_;
uint64_t next_op_id_;
};
class AllocBloomFilterContext
@ -1343,8 +1354,18 @@ public:
*/
int allocate_gi_recursively(AllocGIContext &ctx);
/**
* Allocate m dump operator.
* Allocate op for monitering
*/
int alloc_op_pre(AllocOpContext& ctx);
int alloc_op_post(AllocOpContext& ctx);
int find_rownum_expr_recursively(bool &found, const ObRawExpr *expr);
int find_rownum_expr(bool &found, const ObIArray<ObRawExpr *> &exprs);
int find_rownum_expr(bool &found);
int disable_rownum_expr(hash::ObHashSet<uint64_t> &disabled_op_set, ObIArray<uint64_t> &cur_path);
int gen_temp_op_id(AllocOpContext& ctx);
int recursively_disable_alloc_op_above(AllocOpContext& ctx);
int alloc_nodes_above(AllocOpContext& ctx, const uint64_t &flags);
int allocate_material_node_above();
int allocate_monitoring_dump_node_above(uint64_t flags, uint64_t line_id);
virtual int gen_location_constraint(void *ctx);
@ -1744,10 +1765,6 @@ private:
*/
int numbering_operator_pre(NumberingCtx &ctx);
void numbering_operator_post(NumberingCtx &ctx);
/**
* allocate md operator
*/
int alloc_md_post(AllocMDContext &ctx);
/**
* Numbering px transmit op with dfo id
* for Explain display
@ -1783,20 +1800,20 @@ private:
int64_t &filter_id);
int create_runtime_filter_info(
ObLogicalOperator *op,
ObLogicalOperator *join_filter_creare_op,
ObLogicalOperator *join_filter_create_op,
ObLogicalOperator *join_filter_use_op,
double join_filter_rate);
int add_join_filter_info(
ObLogicalOperator *join_filter_creare_op,
ObLogicalOperator *join_filter_create_op,
ObLogicalOperator *join_filter_use_op,
ObRawExpr *join_filter_expr,
RuntimeFilterType type);
int add_partition_join_filter_info(
ObLogicalOperator *join_filter_creare_op,
ObLogicalOperator *join_filter_create_op,
RuntimeFilterType type);
int generate_runtime_filter_expr(
ObLogicalOperator *op,
ObLogicalOperator *join_filter_creare_op,
ObLogicalOperator *join_filter_create_op,
ObLogicalOperator *join_filter_use_op,
double join_filter_rate,
RuntimeFilterType type);
@ -1804,6 +1821,17 @@ private:
ObLogJoinFilter *join_filter_use,
ObRawExpr *join_use_expr,
ObRawExpr *join_create_expr);
int check_can_extract_query_range_by_rf(
ObLogicalOperator *scan_node,
ObLogicalOperator *join_filter_create_op,
ObLogicalOperator *join_filter_use_op,
bool &can_extract_query_range,
ObIArray<int64_t> &prefix_col_idxs);
int try_prepare_rf_query_range_info(
ObLogicalOperator *join_filter_create_op,
ObLogicalOperator *join_filter_use_op,
ObLogicalOperator *scan_node,
const JoinFilterInfo &info);
/* manual set dop for each dfo */