spaces-X commented on code in PR #10448:
URL: https://github.com/apache/doris/pull/10448#discussion_r908074976


##########
be/src/olap/memtable.cpp:
##########
@@ -161,11 +179,12 @@ void MemTable::_insert_one_row_from_block(RowInBlock* 
row_in_block) {
     if (is_exist) {
         _aggregate_two_row_in_block(row_in_block, _vec_hint.curr->key);
     } else {
-        row_in_block->init_agg_places(_agg_functions, 
_schema->num_key_columns());
+        row_in_block->init_agg_places(
+                
(char*)_table_mem_pool->allocate(_total_size_of_aggregate_states),

Review Comment:
   I think `_total_size_of_aggregate_states` will not be large, depending on 
the number and type of value columns. Each value column needs a buffer to store 
the agg result, which is independent of the number of lines.
   
   Usually the number of value column will not be very large, may be less than 
10. And the size and alignment length of basic data types are not large.
   
   However, the cumulative value of memory allocated by mem pool will be 
relatively large.
   



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