crepererum commented on code in PR #4371:
URL: https://github.com/apache/arrow-datafusion/pull/4371#discussion_r1033396503


##########
datafusion/core/src/physical_plan/aggregates/hash.rs:
##########
@@ -257,12 +313,32 @@ fn group_aggregate_batch(
                         accumulator_set,
                         indices: vec![row as u32], // 1.3
                     };
+                    // NOTE: do NOT include the `GroupState` struct size in 
here because this is captured by
+                    // `group_states` (see allocation down below)
+                    allocated += group_state

Review Comment:
   I think as long as the [`Allocator` 
API](https://doc.rust-lang.org/std/alloc/trait.Allocator.html) in Rust isn't 
stable, this will be a bit of a mess. Once it is stable, we could have very 
elegant memory accounting.



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

Reply via email to