Gabriel39 commented on code in PR #12437:
URL: https://github.com/apache/doris/pull/12437#discussion_r964684961


##########
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:
   If prepare failed, `close` should be never called.



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

Reply via email to