[SKIP INDEX] fix falifisable filter use incorrect obj meta.
This commit is contained in:
parent
0c9c0a5d12
commit
d9de59fd05
@ -114,7 +114,9 @@ int ObSSTableIndexFilter::is_filtered_by_skipping_index(
|
||||
auto *white_filter = static_cast<sql::ObWhiteFilterExecutor *>(node.filter_);
|
||||
const uint32_t col_offset = white_filter->get_col_offsets(is_cg_).at(0);
|
||||
const uint32_t col_idx = static_cast<uint32_t>(read_info->get_columns_index().at(col_offset));
|
||||
const ObObjMeta obj_meta = read_info->get_columns_desc().at(col_offset).col_type_;
|
||||
if (OB_FAIL(skip_filter_executor_.falsifiable_pushdown_filter(col_idx,
|
||||
obj_meta,
|
||||
node.skip_index_type_,
|
||||
index_info,
|
||||
*white_filter,
|
||||
|
@ -49,6 +49,7 @@ int ObSkipIndexFilterExecutor::read_aggregate_data(const uint32_t col_idx,
|
||||
|
||||
int ObSkipIndexFilterExecutor::falsifiable_pushdown_filter(
|
||||
const uint32_t col_idx,
|
||||
const ObObjMeta &obj_meta,
|
||||
const ObSkipIndexType index_type,
|
||||
const ObMicroIndexInfo &index_info,
|
||||
sql::ObWhiteFilterExecutor &filter,
|
||||
@ -64,7 +65,8 @@ int ObSkipIndexFilterExecutor::falsifiable_pushdown_filter(
|
||||
} else {
|
||||
switch (index_type) {
|
||||
case ObSkipIndexType::MIN_MAX: {
|
||||
if (OB_FAIL(filter_on_min_max(col_idx, index_info.get_row_count(), filter, allocator))) {
|
||||
if (OB_FAIL(filter_on_min_max(col_idx, index_info.get_row_count(),
|
||||
obj_meta, filter, allocator))) {
|
||||
LOG_WARN("Fail to filter on min_max", K(ret), K(col_idx));
|
||||
}
|
||||
break;
|
||||
@ -81,12 +83,12 @@ int ObSkipIndexFilterExecutor::falsifiable_pushdown_filter(
|
||||
int ObSkipIndexFilterExecutor::filter_on_min_max(
|
||||
const uint32_t col_idx,
|
||||
const uint64_t row_count,
|
||||
const ObObjMeta &obj_meta,
|
||||
sql::ObWhiteFilterExecutor &filter,
|
||||
common::ObIAllocator &allocator)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
sql::ObBoolMask &fal_desc = filter.get_filter_bool_mask();
|
||||
const ObObjMeta &obj_meta = filter.get_filter_node().expr_->args_[0]->obj_meta_;
|
||||
const share::schema::ObColumnParam *col_param = filter.get_col_params().at(0);
|
||||
ObStorageDatum null_count;
|
||||
ObStorageDatum min_datum;
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
agg_row_reader_.reset();
|
||||
}
|
||||
int falsifiable_pushdown_filter(const uint32_t col_idx,
|
||||
const ObObjMeta &obj_meta,
|
||||
const ObSkipIndexType index_type,
|
||||
const ObMicroIndexInfo &index_info,
|
||||
sql::ObWhiteFilterExecutor &filter,
|
||||
@ -43,6 +44,7 @@ public:
|
||||
private:
|
||||
int filter_on_min_max(const uint32_t col_idx,
|
||||
const uint64_t row_count,
|
||||
const ObObjMeta &obj_meta,
|
||||
sql::ObWhiteFilterExecutor &filter,
|
||||
common::ObIAllocator &allocator);
|
||||
|
||||
|
@ -272,7 +272,8 @@ int TestSkipIndexFilter::test_skip_index_filter_pushdown (
|
||||
index_info.agg_buf_size_ = buf_size;
|
||||
index_info.row_header_ = &row_header;
|
||||
|
||||
ret = skip_index_filter.falsifiable_pushdown_filter(col_idx, ObSkipIndexType::MIN_MAX, index_info, filter, allocator_);
|
||||
ret = skip_index_filter.falsifiable_pushdown_filter(col_idx, filter.filter_.expr_->args_[0]->obj_meta_,
|
||||
ObSkipIndexType::MIN_MAX, index_info, filter, allocator_);
|
||||
fal_desc = filter.get_filter_bool_mask();
|
||||
|
||||
|
||||
|
@ -97,6 +97,10 @@ void TestSSTableIndexFilter::init()
|
||||
ObColExtend col_extend;
|
||||
col_extend.skip_index_attr_.set_min_max();
|
||||
read_info_.cols_extend_.push_back(col_extend);
|
||||
read_info_.cols_desc_.init(1,allocator_);
|
||||
ObColDesc col_desc;
|
||||
col_desc.col_type_.set_uint64();
|
||||
read_info_.cols_desc_.push_back(col_desc);
|
||||
}
|
||||
|
||||
void TestSSTableIndexFilter::test_skipping_filter_nodes_builder_1()
|
||||
|
Loading…
x
Reference in New Issue
Block a user