From d331bfc513008da7f8f22f344efe57a33bb69be5 Mon Sep 17 00:00:00 2001 From: HappenLee Date: Fri, 25 Aug 2023 10:43:02 +0800 Subject: [PATCH] [Performance](pipeline) support shared scan segment in mow (#23305) --- be/src/vec/exec/scan/new_olap_scan_node.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/be/src/vec/exec/scan/new_olap_scan_node.cpp b/be/src/vec/exec/scan/new_olap_scan_node.cpp index 31971e42c0..d603aafa81 100644 --- a/be/src/vec/exec/scan/new_olap_scan_node.cpp +++ b/be/src/vec/exec/scan/new_olap_scan_node.cpp @@ -443,7 +443,7 @@ Status NewOlapScanNode::_init_scanners(std::list* scanners) { } int scanners_per_tablet = std::max(1, 64 / (int)_scan_ranges.size()); - bool is_duplicate_key = false; + bool is_dup_mow_key = false; size_t segment_count = 0; std::vector> rowset_splits_vector(_scan_ranges.size()); std::vector> tablet_rs_seg_count(_scan_ranges.size()); @@ -460,8 +460,10 @@ Status NewOlapScanNode::_init_scanners(std::list* scanners) { true); RETURN_IF_ERROR(status); - is_duplicate_key = tablet->keys_type() == DUP_KEYS; - if (!is_duplicate_key) { + is_dup_mow_key = + tablet->keys_type() == DUP_KEYS || (tablet->keys_type() == UNIQUE_KEYS && + tablet->enable_unique_key_merge_on_write()); + if (!is_dup_mow_key) { break; } @@ -492,7 +494,7 @@ Status NewOlapScanNode::_init_scanners(std::list* scanners) { } } - if (is_duplicate_key) { + if (is_dup_mow_key) { auto build_new_scanner = [&](const TPaloScanRange& scan_range, const std::vector& key_ranges, const std::vector& rs_splits) {