dataroaring commented on code in PR #10775:
URL: https://github.com/apache/doris/pull/10775#discussion_r918002387
##########
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:
DCHECK(alignment_of_state & (alignment_of_state -1) == 0);
_total_size_of_aggregate_states = (_total_size_of_aggregate_states +
alignment_of_state -1 ) & (~(alignment_of_state -1));
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]