HappenLee commented on code in PR #10739: URL: https://github.com/apache/doris/pull/10739#discussion_r918541657
########## be/src/olap/memtable.cpp: ########## @@ -118,6 +118,19 @@ void MemTable::_init_agg_functions(const vectorized::Block* block) { } MemTable::~MemTable() { + if (_vec_skip_list != nullptr && _keys_type != KeysType::DUP_KEYS) { + VecTable::Iterator it(_vec_skip_list.get()); + for (it.SeekToFirst(); it.Valid(); it.Next()) { + // We should release agg_places here, because they are not released when a + // load is canceled. + for (size_t i = _schema->num_key_columns(); i < _schema->num_columns(); ++i) { + auto function = _agg_functions[i]; + if (it.key()->agg_places(i) != nullptr) { Review Comment: why here need to check nullptr? maybe `DCHECK` is better? ########## be/src/olap/memtable.cpp: ########## @@ -322,6 +335,10 @@ void MemTable::_collect_vskiplist_results() { _output_mutable_block.clear_column_data(); } Review Comment: why not ``` else { _vec_skip_list.reset(); } ``` -- 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