dataroaring commented on code in PR #41701:
URL: https://github.com/apache/doris/pull/41701#discussion_r1802405826


##########
be/src/olap/memtable.cpp:
##########
@@ -578,6 +546,200 @@ void MemTable::_aggregate() {
     }
 }
 
+template <bool is_final>
+void MemTable::_aggregate_for_flexible_partial_update_without_seq_col(
+        const vectorized::ColumnsWithTypeAndName& block_data,
+        vectorized::MutableBlock& mutable_block, std::vector<RowInBlock*>& 
temp_row_in_blocks) {
+    RowInBlock* prev_row = nullptr;
+    int row_pos = -1;
+    auto& skip_bitmaps = assert_cast<vectorized::ColumnBitmap*>(
+                                 
mutable_block.mutable_columns()[_skip_bitmap_col_idx].get())
+                                 ->get_data();
+    auto& delete_signs = assert_cast<vectorized::ColumnInt8*>(
+                                 
mutable_block.mutable_columns()[_delete_sign_col_idx].get())
+                                 ->get_data();
+    RowInBlock* row_with_delete_sign {nullptr};
+    RowInBlock* row_without_delete_sign {nullptr};
+
+    auto finalize_rows = [&]() {
+        if (row_with_delete_sign != nullptr) {
+            temp_row_in_blocks.push_back(row_with_delete_sign);
+            _finalize_one_row<is_final, false>(row_with_delete_sign, 
block_data, ++row_pos);
+            row_with_delete_sign = nullptr;
+        }
+        if (row_without_delete_sign != nullptr) {
+            temp_row_in_blocks.push_back(row_without_delete_sign);
+            _finalize_one_row<is_final, false>(row_without_delete_sign, 
block_data, ++row_pos);
+            row_without_delete_sign = nullptr;
+        }
+        _arena->clear();

Review Comment:
   It seems that, row_with_delete_sign and row_without_delete sign can not be 
set together. We can use a pair to replace two vars.
   
   std::pair<RowInBlock *, bool>, bool indicates it is has delete sign.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to