Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions be/src/vec/exec/scan/new_olap_scan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,6 @@ Status NewOlapScanNode::_should_push_down_function_filter(VectorizedFnCall* fn_c
return Status::OK();
}

bool NewOlapScanNode::_should_push_down_common_expr() {
return _state->enable_common_expr_pushdown() &&
(_olap_scan_node.keyType == TKeysType::DUP_KEYS ||
(_olap_scan_node.keyType == TKeysType::UNIQUE_KEYS &&
_olap_scan_node.__isset.enable_unique_key_merge_on_write &&
_olap_scan_node.enable_unique_key_merge_on_write));
}

// PlanFragmentExecutor will call this method to set scan range
// Doris scan range is defined in thrift file like this
// struct TPaloScanRange {
Expand Down Expand Up @@ -435,7 +427,7 @@ Status NewOlapScanNode::_init_scanners(std::list<VScannerSPtr>* scanners) {
message += conjunct->root()->debug_string();
}
}
_runtime_profile->add_info_string("RemainedDownPredicates", message);
_runtime_profile->add_info_string("RemainedPredicates", message);
}

if (!_olap_scan_node.output_column_unique_ids.empty()) {
Expand Down
11 changes: 10 additions & 1 deletion be/src/vec/exec/scan/new_olap_scan_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,16 @@ class NewOlapScanNode : public VScanNode {

PushDownType _should_push_down_is_null_predicate() override { return PushDownType::ACCEPTABLE; }

bool _should_push_down_common_expr() override;
bool _should_push_down_common_expr() override {
return _state->enable_common_expr_pushdown() && _storage_no_merge();
}

bool _storage_no_merge() override {
return (_olap_scan_node.keyType == TKeysType::DUP_KEYS ||
(_olap_scan_node.keyType == TKeysType::UNIQUE_KEYS &&
_olap_scan_node.__isset.enable_unique_key_merge_on_write &&
_olap_scan_node.enable_unique_key_merge_on_write));
}

Status _init_scanners(std::list<VScannerSPtr>* scanners) override;

Expand Down
3 changes: 2 additions & 1 deletion be/src/vec/exec/scan/vscan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ Status VScanNode::_normalize_predicate(const VExprSPtr& conjunct_expr_root, VExp
return Status::OK();
}

if (pdt == PushDownType::ACCEPTABLE && _is_key_column(slot->col_name())) {
if (pdt == PushDownType::ACCEPTABLE &&
(_is_key_column(slot->col_name()) || _storage_no_merge())) {
output_expr = nullptr;
return Status::OK();
} else {
Expand Down
2 changes: 2 additions & 0 deletions be/src/vec/exec/scan/vscan_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ class VScanNode : public ExecNode, public RuntimeFilterConsumer {

virtual bool _should_push_down_common_expr() { return false; }

virtual bool _storage_no_merge() { return false; }

virtual PushDownType _should_push_down_bloom_filter() { return PushDownType::UNACCEPTABLE; }

virtual PushDownType _should_push_down_bitmap_filter() { return PushDownType::UNACCEPTABLE; }
Expand Down