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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new f70cff16c90 [fix](compaction) fix incorrect grouping of vertical 
compaction columns in tables only with key columns #32896 (#33180)
f70cff16c90 is described below

commit f70cff16c9001db4c50f79d856812d3a8c46bfcd
Author: Luwei <814383...@qq.com>
AuthorDate: Wed Apr 3 09:20:50 2024 +0800

    [fix](compaction) fix incorrect grouping of vertical compaction columns in 
tables only with key columns #32896 (#33180)
---
 be/src/olap/merger.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/be/src/olap/merger.cpp b/be/src/olap/merger.cpp
index 734b81794fb..62753c4710c 100644
--- a/be/src/olap/merger.cpp
+++ b/be/src/olap/merger.cpp
@@ -176,10 +176,17 @@ void Merger::vertical_split_columns(TabletSchemaSPtr 
tablet_schema,
         if (i == sequence_col_idx || i == delete_sign_idx) {
             continue;
         }
-        if ((i - num_key_cols) % 
config::vertical_compaction_num_columns_per_group == 0) {
-            column_groups->emplace_back();
+
+        if (!value_columns.empty() &&
+            value_columns.size() % 
config::vertical_compaction_num_columns_per_group == 0) {
+            column_groups->push_back(value_columns);
+            value_columns.clear();
         }
-        column_groups->back().emplace_back(i);
+        value_columns.push_back(i);
+    }
+
+    if (!value_columns.empty()) {
+        column_groups->push_back(value_columns);
     }
 }
 


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

Reply via email to