[CP] [Fix] HBase filter cell

This commit is contained in:
IHEII 2024-05-30 04:23:10 +00:00 committed by ob-robot
parent b70ce332f4
commit e4bf916318
3 changed files with 11 additions and 2 deletions

View File

@ -13,6 +13,7 @@
#define USING_LOG_PREFIX SERVER
#include "ob_htable_filter_operator.h"
#include "ob_htable_utils.h"
#include "ob_htable_filters.h"
#include "lib/json/ob_json.h"
#include "share/ob_errno.h"
#include "share/table/ob_ttl_util.h"
@ -470,7 +471,7 @@ int ObHTableScanMatcher::match_column(const ObHTableCell &cell, ObHTableMatchCod
// in reverse scan order, functions which is filter cell and merge filter return code are completed at add_same_kq_to_res function
if (ObQueryFlag::Reverse != column_tracker_->get_scan_order()){
if (NULL != hfilter_) {
hfilter::Filter::ReturnCode filter_rc;
hfilter::Filter::ReturnCode filter_rc = hfilter::Filter::ReturnCode::INCLUDE;
if (OB_FAIL(hfilter_->filter_cell(cell, filter_rc))) {
LOG_WARN("failed to filter cell", K(ret));
} else {
@ -699,7 +700,7 @@ int ObHTableRowIterator::add_same_kq_to_res(ObIArray<ObNewRow> &same_kq_cells, O
if (OB_SUCC(ret)) {
ObHTableMatchCode match_code = ObHTableMatchCode::INCLUDE;
if (NULL != hfilter_ && ObHTableMatchCode::INCLUDE == match_code) {
hfilter::Filter::ReturnCode filter_rc;
hfilter::Filter::ReturnCode filter_rc = hfilter::Filter::ReturnCode::INCLUDE;
if (OB_FAIL(hfilter_->filter_cell(tmp_cell, filter_rc))) {
LOG_WARN("failed to filter cell", K(ret));
} else {

View File

@ -829,6 +829,13 @@ bool PageFilter::filter_row()
return rows_accepted_ > page_size_;
}
int PageFilter::filter_cell(const ObHTableCell &cell, ReturnCode &ret_code)
{
UNUSED(cell);
ret_code = ReturnCode::INCLUDE;
return common::OB_SUCCESS;
}
bool PageFilter::filter_all_remaining()
{
return rows_accepted_ >= page_size_;

View File

@ -459,6 +459,7 @@ public:
virtual ~PageFilter() {}
virtual bool filter_row() override;
virtual bool has_filter_row() override { return true; }
virtual int filter_cell(const ObHTableCell &cell, ReturnCode &ret_code) override;
virtual bool filter_all_remaining() override;
TO_STRING_KV("filter", "PageFilter", K_(page_size), K_(rows_accepted));
private: