This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 09b7c22f6b [Opt](exec) remove unless null key when no split in convert
key range (#16624)
09b7c22f6b is described below
commit 09b7c22f6b6fa0a42d0de84d5c44a8b664e59430
Author: HappenLee <[email protected]>
AuthorDate: Sat Feb 11 15:44:35 2023 +0800
[Opt](exec) remove unless null key when no split in convert key range
(#16624)
---
be/src/exec/olap_common.h | 14 +++++++-------
be/src/vec/exec/scan/new_olap_scan_node.cpp | 2 +-
be/src/vec/exec/scan/new_olap_scanner.cpp | 3 +--
be/src/vec/exec/scan/new_olap_scanner.h | 3 +--
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h
index 869baab136..ca3710002d 100644
--- a/be/src/exec/olap_common.h
+++ b/be/src/exec/olap_common.h
@@ -710,13 +710,6 @@ bool
ColumnValueRange<primitive_type>::convert_to_avg_range_value(
max_value.set_type(TimeType::TIME_DATE);
}
- if (contain_null()) {
- begin_scan_keys.emplace_back();
- begin_scan_keys.back().add_null();
- end_scan_keys.emplace_back();
- end_scan_keys.back().add_null();
- }
-
if (min_value > max_value || max_scan_key_num == 1) {
return no_split();
}
@@ -740,6 +733,13 @@ bool
ColumnValueRange<primitive_type>::convert_to_avg_range_value(
return no_split();
}
+ // Add null key if contain null, must do after no_split check
+ if (contain_null()) {
+ begin_scan_keys.emplace_back();
+ begin_scan_keys.back().add_null();
+ end_scan_keys.emplace_back();
+ end_scan_keys.back().add_null();
+ }
while (true) {
begin_scan_keys.emplace_back();
begin_scan_keys.back().add_value(
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 154cab3acf..0285189ef1 100644
--- a/be/src/vec/exec/scan/new_olap_scan_node.cpp
+++ b/be/src/vec/exec/scan/new_olap_scan_node.cpp
@@ -418,7 +418,7 @@ Status
NewOlapScanNode::_init_scanners(std::list<VScanner*>* scanners) {
NewOlapScanner* scanner = new NewOlapScanner(
_state, this, _limit_per_scanner,
_olap_scan_node.is_preaggregation,
- _need_agg_finalize, *scan_range, _scanner_profile.get());
+ _need_agg_finalize, _scanner_profile.get());
scanner->set_compound_filters(_compound_filters);
// add scanner to pool before doing prepare.
diff --git a/be/src/vec/exec/scan/new_olap_scanner.cpp
b/be/src/vec/exec/scan/new_olap_scanner.cpp
index ba7e2ded37..8dc2e80e2f 100644
--- a/be/src/vec/exec/scan/new_olap_scanner.cpp
+++ b/be/src/vec/exec/scan/new_olap_scanner.cpp
@@ -24,8 +24,7 @@
namespace doris::vectorized {
NewOlapScanner::NewOlapScanner(RuntimeState* state, NewOlapScanNode* parent,
int64_t limit,
- bool aggregation, bool need_agg_finalize,
- const TPaloScanRange& scan_range,
RuntimeProfile* profile)
+ bool aggregation, bool need_agg_finalize,
RuntimeProfile* profile)
: VScanner(state, static_cast<VScanNode*>(parent), limit, profile),
_aggregation(aggregation),
_need_agg_finalize(need_agg_finalize),
diff --git a/be/src/vec/exec/scan/new_olap_scanner.h
b/be/src/vec/exec/scan/new_olap_scanner.h
index e62934e934..b22537a09f 100644
--- a/be/src/vec/exec/scan/new_olap_scanner.h
+++ b/be/src/vec/exec/scan/new_olap_scanner.h
@@ -35,8 +35,7 @@ struct FilterPredicates;
class NewOlapScanner : public VScanner {
public:
NewOlapScanner(RuntimeState* state, NewOlapScanNode* parent, int64_t
limit, bool aggregation,
- bool need_agg_finalize, const TPaloScanRange& scan_range,
- RuntimeProfile* profile);
+ bool need_agg_finalize, RuntimeProfile* profile);
Status open(RuntimeState* state) override;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]