change filter_tree_merge_status

This commit is contained in:
neicun1024
2024-06-25 12:04:20 +00:00
committed by ob-robot
parent c25aad5f74
commit 236f3cf191
3 changed files with 6 additions and 14 deletions

View File

@ -790,7 +790,7 @@ sql::ObCommonFilterTreeStatus ObCOSSTableRowsFilter::merge_common_filter_tree_st
* filter1 filter2 is_common status
* NOP NOP O NONE_FILTER
* WHITE WHITE X WHITE
* WHITE SINGLE_BLACK X SINGLE_BLACK
* WHITE SINGLE_BLACK O NONE_FILTER
* WHITE MULTI_BLACK O NONE_FILTER
* SINGLE_BLACK SINGLE_BLACK X SINGLE_BLACK
* SINGLE_BLACK MULTI_BLACK X MULTI_BLACK
@ -802,15 +802,7 @@ bool ObCOSSTableRowsFilter::is_common_filter_tree_status(
const sql::ObCommonFilterTreeStatus status_one,
const sql::ObCommonFilterTreeStatus status_two)
{
bool ret = true;
if (sql::ObCommonFilterTreeStatus::NONE_FILTER == status_one
|| sql::ObCommonFilterTreeStatus::NONE_FILTER == status_two
|| (sql::ObCommonFilterTreeStatus::SINGLE_BLACK != status_one
&& sql::ObCommonFilterTreeStatus::SINGLE_BLACK != status_two
&& status_one != status_two)) {
ret = false;
}
return ret;
return (sql::ObCommonFilterTreeStatus)(filter_tree_merge_status[status_one][status_two]) > 0;
}
void ObCOSSTableRowsFilter::set_status_of_filter_tree(

View File

@ -33,8 +33,8 @@ public:
static constexpr uint32_t MAX_NUM_OF_CG_ITER_TO_LOCATE_IN_ADVANCE = 2;
static constexpr uint8_t filter_tree_merge_status[sql::ObCommonFilterTreeStatus::MAX_STATUS][sql::ObCommonFilterTreeStatus::MAX_STATUS] =
{ {0, 0, 0, 0}, \
{0, 1, 2, 0}, \
{0, 2, 2, 3}, \
{0, 1, 0, 0}, \
{0, 0, 2, 3}, \
{0, 0, 3, 3}
};

View File

@ -543,8 +543,8 @@ TEST_F(TestCOSSTableRowsFilter, co_sstable_rows_filter_test_rewrite_filter_case_
init_multi_white_and_black_filter_case_two();
ret = co_filter_.rewrite_filter();
ASSERT_EQ(OB_SUCCESS, ret);
ASSERT_EQ(3, co_filter_.filter_iters_.count());
ASSERT_EQ(3, co_filter_.iter_filter_node_.count());
ASSERT_EQ(5, co_filter_.filter_iters_.count());
ASSERT_EQ(5, co_filter_.iter_filter_node_.count());
ASSERT_EQ(3, co_filter_.bitmap_buffer_.count());
ASSERT_EQ(ObICGIterator::ObCGIterType::OB_CG_SCANNER,
co_filter_.filter_iters_[0]->get_type());