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/07/11 14:45:33 UTC

[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #10775: [Bug][Memtable] fix core dump on int128 because not aligned by 16 byte

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