[FOLLOWUP] cherrypick after refactoring scan nodes (#10177)
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include "runtime/large_int_value.h"
|
||||
#include "runtime/runtime_filter_mgr.h"
|
||||
#include "util/priority_thread_pool.hpp"
|
||||
#include "util/to_string.h"
|
||||
#include "vec/core/block.h"
|
||||
#include "vec/exec/volap_scanner.h"
|
||||
#include "vec/exprs/vexpr.h"
|
||||
@ -640,6 +641,30 @@ Status VOlapScanNode::normalize_conjuncts() {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
static std::string olap_filter_to_string(const doris::TCondition& condition) {
|
||||
auto op_name = condition.condition_op;
|
||||
if (condition.condition_op == "*=") {
|
||||
op_name = "IN";
|
||||
} else if (condition.condition_op == "!*=") {
|
||||
op_name = "NOT IN";
|
||||
}
|
||||
return fmt::format("{{{} {} {}}}", condition.column_name, op_name,
|
||||
to_string(condition.condition_values));
|
||||
}
|
||||
|
||||
static std::string olap_filters_to_string(const std::vector<doris::TCondition>& filters) {
|
||||
std::string filters_string;
|
||||
filters_string += "[";
|
||||
for (auto it = filters.cbegin(); it != filters.cend(); it++) {
|
||||
if (it != filters.cbegin()) {
|
||||
filters_string += ",";
|
||||
}
|
||||
filters_string += olap_filter_to_string(*it);
|
||||
}
|
||||
filters_string += "]";
|
||||
return filters_string;
|
||||
}
|
||||
|
||||
Status VOlapScanNode::build_olap_filters() {
|
||||
for (auto& iter : _column_value_ranges) {
|
||||
std::vector<TCondition> filters;
|
||||
@ -650,6 +675,8 @@ Status VOlapScanNode::build_olap_filters() {
|
||||
}
|
||||
}
|
||||
|
||||
_runtime_profile->add_info_string("PushdownPredicate", olap_filters_to_string(_olap_filter));
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
@ -931,7 +958,7 @@ void VOlapScanNode::remove_pushed_conjuncts(RuntimeState* state) {
|
||||
// filter idle conjunct in vexpr_contexts
|
||||
auto checker = [&](int index) { return _pushed_conjuncts_index.count(index); };
|
||||
std::string vconjunct_information = _peel_pushed_vconjunct(state, checker);
|
||||
_scanner_profile->add_info_string("VconjunctExprTree", vconjunct_information);
|
||||
_runtime_profile->add_info_string("NonPushdownPredicate", vconjunct_information);
|
||||
}
|
||||
|
||||
// Construct the ColumnValueRange for one specified column
|
||||
|
||||
Reference in New Issue
Block a user