kosiew commented on code in PR #25188:
URL: https://github.com/apache/datafusion/pull/25188#discussion_r4101244898
##########
datafusion/physical-plan/src/aggregates/grouped_hash_stream.rs:
##########
@@ -551,12 +556,16 @@ impl GroupedHashAggregateStream {
};
let group_values = new_group_values(group_schema, &group_ordering)?;
- let reservation = MemoryConsumer::new(name)
- // We interpret 'can spill' as 'can handle memory back pressure'.
- // This value needs to be set to true for the default memory pool
implementations
- // to ensure fair application of back pressure amongst the memory
consumers.
- .with_can_spill(oom_mode != OutOfMemoryMode::ReportError)
- .register(context.memory_pool());
+ let merge_pool = Arc::new(MergeMemoryPool::new(
Review Comment:
No change needed. `FinalHashAggregateStream::into_replay_stream` calls
`try_resize(0)` before creating `reservation.new_empty()`. `new_empty()` shares
the original reservation's `SharedRegistration`, hence the same
`MemoryConsumer`; fair-pool accounting remains per aggregate operator. The
grouped legacy path needed `MergeMemoryPool` because its replay also creates
aggregate state while merging.
--
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]