You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/04 04:29:28 UTC

[incubator-doris] branch master updated: [Improvement] change the condition of vectorized compaction (#9950)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 79620f6fa2 [Improvement] change the condition of vectorized compaction (#9950)
79620f6fa2 is described below

commit 79620f6fa23e3f88de6a296a1e13515e0fe99ce1
Author: Gabriel <ga...@gmail.com>
AuthorDate: Sat Jun 4 12:29:23 2022 +0800

    [Improvement] change the condition of vectorized compaction (#9950)
---
 be/src/olap/compaction.cpp | 12 +-----------
 be/src/olap/compaction.h   |  3 ---
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index ff98cece3f..c279ac7d62 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -82,7 +82,7 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     _output_version =
             Version(_input_rowsets.front()->start_version(), _input_rowsets.back()->end_version());
 
-    auto use_vectorized_compaction = _should_use_vectorized_compaction();
+    auto use_vectorized_compaction = config::enable_vectorized_compaction;
     string merge_type = use_vectorized_compaction ? "v" : "";
 
     LOG(INFO) << "start " << merge_type << compaction_name() << ". tablet=" << _tablet->full_name()
@@ -284,16 +284,6 @@ int64_t Compaction::_get_input_num_rows_from_seg_grps() {
     return num_rows;
 }
 
-bool Compaction::_should_use_vectorized_compaction() {
-    auto cols = _tablet->tablet_schema().columns();
-    for (auto it = cols.begin(); it != cols.end(); it++) {
-        if ((*it).type() == FieldType::OLAP_FIELD_TYPE_STRING) {
-            return false;
-        }
-    }
-    return config::enable_vectorized_compaction;
-}
-
 int64_t Compaction::get_compaction_permits() {
     int64_t permits = 0;
     for (auto rowset : _input_rowsets) {
diff --git a/be/src/olap/compaction.h b/be/src/olap/compaction.h
index b7a6bbf20b..bd37cae275 100644
--- a/be/src/olap/compaction.h
+++ b/be/src/olap/compaction.h
@@ -80,9 +80,6 @@ private:
     // return -1 if these are not alpha rowsets.
     int64_t _get_input_num_rows_from_seg_grps();
 
-    // check whether we should enable vectorized compaction.
-    bool _should_use_vectorized_compaction();
-
 protected:
     // the root tracker for this compaction
     std::shared_ptr<MemTracker> _mem_tracker;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org