BiteTheDDDDt commented on code in PR #10775: URL: https://github.com/apache/doris/pull/10775#discussion_r918022045
########## be/src/olap/memtable.cpp: ########## @@ -101,19 +101,14 @@ void MemTable::_init_agg_functions(const vectorized::Block* block) { } for (uint32_t cid = _schema->num_key_columns(); cid < _schema->num_columns(); ++cid) { + size_t alignment_of_state = _agg_functions[cid]->align_of_data(); + size_t module = _total_size_of_aggregate_states % alignment_of_state; + if (module) { + _total_size_of_aggregate_states += alignment_of_state - module; + } Review Comment: alignment_of_state just is `sizeof(FunctionData)`, not necessarily power of 2 -- 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