diff --git a/src/share/ob_i_tablet_scan.cpp b/src/share/ob_i_tablet_scan.cpp index a195a54269..18134f0acd 100644 --- a/src/share/ob_i_tablet_scan.cpp +++ b/src/share/ob_i_tablet_scan.cpp @@ -65,7 +65,10 @@ DEF_TO_STRING(ObVTableScanParam) KPC_(op_filters), K_(table_scan_opt), 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(); return pos; } diff --git a/src/share/ob_i_tablet_scan.h b/src/share/ob_i_tablet_scan.h index 5c10480140..f11854de97 100644 --- a/src/share/ob_i_tablet_scan.h +++ b/src/share/ob_i_tablet_scan.h @@ -269,7 +269,11 @@ ObVTableScanParam() : table_scan_opt_(), ext_file_column_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() @@ -387,6 +391,12 @@ private: // New schema, used throughout the life cycle of table_scan share::schema::ObSchemaGetterGuard *schema_guard_; 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 diff --git a/src/sql/engine/basic/ob_pushdown_filter.cpp b/src/sql/engine/basic/ob_pushdown_filter.cpp index 9ec521524d..cc188f5ea7 100644 --- a/src/sql/engine/basic/ob_pushdown_filter.cpp +++ b/src/sql/engine/basic/ob_pushdown_filter.cpp @@ -2592,7 +2592,10 @@ ObPushdownExprSpec::ObPushdownExprSpec(ObIAllocator &alloc) pd_storage_aggregate_output_(alloc), ext_file_column_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_, ext_file_column_exprs_, ext_column_convert_exprs_, - trans_info_expr_); + trans_info_expr_, + auto_split_filter_type_, + auto_split_expr_, + auto_split_params_); return ret; } @@ -2634,7 +2640,10 @@ OB_DEF_DESERIALIZE(ObPushdownExprSpec) pd_storage_aggregate_output_, ext_file_column_exprs_, ext_column_convert_exprs_, - trans_info_expr_); + trans_info_expr_, + auto_split_filter_type_, + auto_split_expr_, + auto_split_params_); return ret; } @@ -2655,7 +2664,10 @@ OB_DEF_SERIALIZE_SIZE(ObPushdownExprSpec) pd_storage_aggregate_output_, ext_file_column_exprs_, ext_column_convert_exprs_, - trans_info_expr_); + trans_info_expr_, + auto_split_filter_type_, + auto_split_expr_, + auto_split_params_); return len; } diff --git a/src/sql/engine/basic/ob_pushdown_filter.h b/src/sql/engine/basic/ob_pushdown_filter.h index 44f73db826..0110c4ee6e 100644 --- a/src/sql/engine/basic/ob_pushdown_filter.h +++ b/src/sql/engine/basic/ob_pushdown_filter.h @@ -1163,6 +1163,9 @@ public: ExprFixedArray ext_file_column_exprs_; ExprFixedArray ext_column_convert_exprs_; ObExpr *trans_info_expr_; + uint64_t auto_split_filter_type_; + ObExpr *auto_split_expr_; + ExprFixedArray auto_split_params_; }; //下压到存储层的表达式执行依赖的op ctx diff --git a/src/storage/access/ob_table_access_param.cpp b/src/storage/access/ob_table_access_param.cpp index 82346f1ec6..76b67a4bfc 100644 --- a/src/storage/access/ob_table_access_param.cpp +++ b/src/storage/access/ob_table_access_param.cpp @@ -56,7 +56,11 @@ ObTableIterParam::ObTableIterParam() is_non_unique_local_index_(false), ss_rowkey_prefix_cnt_(0), 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_non_unique_local_index_ = false; 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_); } @@ -190,7 +198,8 @@ DEF_TO_STRING(ObTableIterParam) K_(is_mds_query), K_(is_non_unique_local_index), K_(ss_rowkey_prefix_cnt), - K_(table_scan_opt)); + K_(table_scan_opt), + K_(is_tablet_spliting)); J_OBJ_END(); return pos; } @@ -298,6 +307,10 @@ int ObTableAccessParam::init( !scan_param.scan_flag_.is_use_block_cache())) { 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(); // vectorize requires blockscan is enabled(_pushdown_storage_level > 0) iter_param_.vectorized_enabled_ = nullptr != get_op() && get_op()->is_vectorized(); diff --git a/src/storage/access/ob_table_access_param.h b/src/storage/access/ob_table_access_param.h index 9f434f6f17..09d8b52bd8 100644 --- a/src/storage/access/ob_table_access_param.h +++ b/src/storage/access/ob_table_access_param.h @@ -149,6 +149,8 @@ public: { pd_storage_flag_.set_use_stmt_iter_pool(true);} OB_INLINE bool has_lob_column_out() const { return has_lob_column_out_; } + OB_INLINE bool is_tablet_spliting() const + { return is_tablet_spliting_; } bool need_trans_info() const; OB_INLINE bool is_use_column_store() const { 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_; sql::ObStoragePushdownFlag pd_storage_flag_; 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