You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/25 11:55:47 UTC

[GitHub] [incubator-doris] zbtzbtzbt commented on a diff in pull request #9157: [Refactor] Refactor the code of vec stream load

zbtzbtzbt commented on code in PR #9157:
URL: https://github.com/apache/incubator-doris/pull/9157#discussion_r857545802


##########
be/src/olap/memtable.cpp:
##########
@@ -145,38 +126,33 @@ void MemTable::insert(const vectorized::Block* block, size_t row_pos, size_t num
     _mem_tracker->consume(newsize - oldsize);
 
     for(int i = 0; i < num_rows; i++){       
-        RowInBlock* row_in_block_ptr = new RowInBlock(cursor_in_mutableblock + i);
-        rowInBlocks.push_back(row_in_block_ptr);
-        insert_one_row_from_block(row_in_block_ptr);
+        _row_in_blocks.emplace_back(new RowInBlock{cursor_in_mutableblock + i});
+        _insert_one_row_from_block(_row_in_blocks.back());
     }   
 }
 
-void MemTable::insert_one_row_from_block(RowInBlock* row_in_block_ptr)
-{
+void MemTable::_insert_one_row_from_block(RowInBlock* row_in_block) {
     _rows++;
     bool overwritten = false;
-    if (_keys_type == KeysType::DUP_KEYS)
-    {
-        _vec_skip_list->Insert(row_in_block_ptr, &overwritten);
+    if (_keys_type == KeysType::DUP_KEYS) {

Review Comment:
   review partial code



-- 
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-unsubscribe@doris.apache.org

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


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