[auto split] relative variable place holder

This commit is contained in:
JLY2015
2024-06-27 08:46:17 +00:00
committed by ob-robot
parent c2ce4f653b
commit 331d22238b
6 changed files with 55 additions and 8 deletions

View File

@ -65,7 +65,10 @@ DEF_TO_STRING(ObVTableScanParam)
KPC_(op_filters), KPC_(op_filters),
K_(table_scan_opt), K_(table_scan_opt),
K_(external_file_format), K_(external_file_format),
K_(external_file_location)); K_(external_file_location),
K_(auto_split_filter),
K_(auto_split_params),
K_(is_tablet_spliting));
J_OBJ_END(); J_OBJ_END();
return pos; return pos;
} }

View File

@ -269,7 +269,11 @@ ObVTableScanParam() :
table_scan_opt_(), table_scan_opt_(),
ext_file_column_exprs_(NULL), ext_file_column_exprs_(NULL),
ext_column_convert_exprs_(NULL), ext_column_convert_exprs_(NULL),
schema_guard_(NULL) schema_guard_(NULL),
auto_split_filter_type_(OB_INVALID_ID),
auto_split_filter_(NULL),
auto_split_params_(NULL),
is_tablet_spliting_(false)
{ } { }
virtual ~ObVTableScanParam() virtual ~ObVTableScanParam()
@ -387,6 +391,12 @@ private:
// New schema, used throughout the life cycle of table_scan // New schema, used throughout the life cycle of table_scan
share::schema::ObSchemaGetterGuard *schema_guard_; share::schema::ObSchemaGetterGuard *schema_guard_;
char schema_guard_buf_[sizeof(share::schema::ObSchemaGetterGuard)]; char schema_guard_buf_[sizeof(share::schema::ObSchemaGetterGuard)];
public:
uint64_t auto_split_filter_type_;
const sql::ObExpr *auto_split_filter_;
sql::ExprFixedArray *auto_split_params_;
bool is_tablet_spliting_;
}; };
class ObITabletScan class ObITabletScan

View File

@ -2592,7 +2592,10 @@ ObPushdownExprSpec::ObPushdownExprSpec(ObIAllocator &alloc)
pd_storage_aggregate_output_(alloc), pd_storage_aggregate_output_(alloc),
ext_file_column_exprs_(alloc), ext_file_column_exprs_(alloc),
ext_column_convert_exprs_(alloc), ext_column_convert_exprs_(alloc),
trans_info_expr_(nullptr) trans_info_expr_(nullptr),
auto_split_filter_type_(OB_INVALID_ID),
auto_split_expr_(nullptr),
auto_split_params_(alloc)
{ {
} }
@ -2613,7 +2616,10 @@ OB_DEF_SERIALIZE(ObPushdownExprSpec)
pd_storage_aggregate_output_, pd_storage_aggregate_output_,
ext_file_column_exprs_, ext_file_column_exprs_,
ext_column_convert_exprs_, ext_column_convert_exprs_,
trans_info_expr_); trans_info_expr_,
auto_split_filter_type_,
auto_split_expr_,
auto_split_params_);
return ret; return ret;
} }
@ -2634,7 +2640,10 @@ OB_DEF_DESERIALIZE(ObPushdownExprSpec)
pd_storage_aggregate_output_, pd_storage_aggregate_output_,
ext_file_column_exprs_, ext_file_column_exprs_,
ext_column_convert_exprs_, ext_column_convert_exprs_,
trans_info_expr_); trans_info_expr_,
auto_split_filter_type_,
auto_split_expr_,
auto_split_params_);
return ret; return ret;
} }
@ -2655,7 +2664,10 @@ OB_DEF_SERIALIZE_SIZE(ObPushdownExprSpec)
pd_storage_aggregate_output_, pd_storage_aggregate_output_,
ext_file_column_exprs_, ext_file_column_exprs_,
ext_column_convert_exprs_, ext_column_convert_exprs_,
trans_info_expr_); trans_info_expr_,
auto_split_filter_type_,
auto_split_expr_,
auto_split_params_);
return len; return len;
} }

View File

@ -1163,6 +1163,9 @@ public:
ExprFixedArray ext_file_column_exprs_; ExprFixedArray ext_file_column_exprs_;
ExprFixedArray ext_column_convert_exprs_; ExprFixedArray ext_column_convert_exprs_;
ObExpr *trans_info_expr_; ObExpr *trans_info_expr_;
uint64_t auto_split_filter_type_;
ObExpr *auto_split_expr_;
ExprFixedArray auto_split_params_;
}; };
//下压到存储层的表达式执行依赖的op ctx //下压到存储层的表达式执行依赖的op ctx

View File

@ -56,7 +56,11 @@ ObTableIterParam::ObTableIterParam()
is_non_unique_local_index_(false), is_non_unique_local_index_(false),
ss_rowkey_prefix_cnt_(0), ss_rowkey_prefix_cnt_(0),
pd_storage_flag_(), pd_storage_flag_(),
table_scan_opt_() table_scan_opt_(),
auto_split_filter_type_(OB_INVALID_ID),
auto_split_filter_(nullptr),
auto_split_params_(nullptr),
is_tablet_spliting_(false)
{ {
} }
@ -104,6 +108,10 @@ void ObTableIterParam::reset()
is_mds_query_ = false; is_mds_query_ = false;
is_non_unique_local_index_ = false; is_non_unique_local_index_ = false;
table_scan_opt_.reset(); table_scan_opt_.reset();
auto_split_filter_type_ = OB_INVALID_ID;
auto_split_filter_ = nullptr;
auto_split_params_ = nullptr;
is_tablet_spliting_ = false;
ObSSTableIndexFilterFactory::destroy_sstable_index_filter(sstable_index_filter_); ObSSTableIndexFilterFactory::destroy_sstable_index_filter(sstable_index_filter_);
} }
@ -190,7 +198,8 @@ DEF_TO_STRING(ObTableIterParam)
K_(is_mds_query), K_(is_mds_query),
K_(is_non_unique_local_index), K_(is_non_unique_local_index),
K_(ss_rowkey_prefix_cnt), K_(ss_rowkey_prefix_cnt),
K_(table_scan_opt)); K_(table_scan_opt),
K_(is_tablet_spliting));
J_OBJ_END(); J_OBJ_END();
return pos; return pos;
} }
@ -298,6 +307,10 @@ int ObTableAccessParam::init(
!scan_param.scan_flag_.is_use_block_cache())) { !scan_param.scan_flag_.is_use_block_cache())) {
iter_param_.disable_blockscan(); iter_param_.disable_blockscan();
} }
iter_param_.auto_split_filter_type_ = scan_param.auto_split_filter_type_;
iter_param_.auto_split_filter_ = scan_param.auto_split_filter_;
iter_param_.auto_split_params_ = scan_param.auto_split_params_;
iter_param_.is_tablet_spliting_ = scan_param.is_tablet_spliting_;
iter_param_.has_virtual_columns_ = table_param.has_virtual_column(); iter_param_.has_virtual_columns_ = table_param.has_virtual_column();
// vectorize requires blockscan is enabled(_pushdown_storage_level > 0) // vectorize requires blockscan is enabled(_pushdown_storage_level > 0)
iter_param_.vectorized_enabled_ = nullptr != get_op() && get_op()->is_vectorized(); iter_param_.vectorized_enabled_ = nullptr != get_op() && get_op()->is_vectorized();

View File

@ -149,6 +149,8 @@ public:
{ pd_storage_flag_.set_use_stmt_iter_pool(true);} { pd_storage_flag_.set_use_stmt_iter_pool(true);}
OB_INLINE bool has_lob_column_out() const OB_INLINE bool has_lob_column_out() const
{ return has_lob_column_out_; } { return has_lob_column_out_; }
OB_INLINE bool is_tablet_spliting() const
{ return is_tablet_spliting_; }
bool need_trans_info() const; bool need_trans_info() const;
OB_INLINE bool is_use_column_store() const OB_INLINE bool is_use_column_store() const
{ return !(get_read_info()->has_all_column_group()) || pd_storage_flag_.is_use_column_store(); } { return !(get_read_info()->has_all_column_group()) || pd_storage_flag_.is_use_column_store(); }
@ -220,6 +222,10 @@ public:
int64_t ss_rowkey_prefix_cnt_; int64_t ss_rowkey_prefix_cnt_;
sql::ObStoragePushdownFlag pd_storage_flag_; sql::ObStoragePushdownFlag pd_storage_flag_;
ObTableScanOption table_scan_opt_; ObTableScanOption table_scan_opt_;
uint64_t auto_split_filter_type_;
const sql::ObExpr *auto_split_filter_;
sql::ExprFixedArray *auto_split_params_;
bool is_tablet_spliting_;
}; };
struct ObTableAccessParam struct ObTableAccessParam