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


##########
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) {
+        _vec_skip_list->Insert(row_in_block, &overwritten);

Review Comment:
   How about add a rethink here?
   Dup table just need to sort, So Is skip list the best way to sort?



-- 
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