englefly commented on code in PR #12437: URL: https://github.com/apache/doris/pull/12437#discussion_r964887444
########## be/src/vec/exec/vaggregation_node.cpp: ########## @@ -499,11 +508,14 @@ Status AggregationNode::close(RuntimeState* state) { VExpr::close(_probe_expr_ctxs, state); if (_executor.close) _executor.close(); - std::visit( - [&](auto&& agg_method) { - COUNTER_SET(_hash_table_size_counter, int64_t(agg_method.data.size())); - }, - _agg_data._aggregated_method_variant); + /// _hash_table_size_counter may be null if prepare failed. + if (_hash_table_size_counter) { Review Comment: Is there any error handling in `prepare()`? We should move error left. -- 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