alamb commented on code in PR #26782:
URL: https://github.com/apache/datafusion/pull/26782#discussion_r4417769868
##########
datafusion/physical-plan/src/aggregates/aggregate_hash_table/common_clustered.rs:
##########
@@ -287,14 +287,16 @@ impl<AggrMode> ClusteredAggregateTable<AggrMode> {
}
/// Releases the capacity that the buffer holds beyond its stored groups,
- /// such as hash table slots and the per-batch `group_indices` scratch, so
- /// that [`Self::memory_size`] reflects the remaining groups.
- ///
- /// Accumulator capacity is not released.
+ /// such as hash table slots, the per-batch `group_indices` scratch and
+ /// per-batch accumulator scratch, so that [`Self::memory_size`] reflects
+ /// the remaining groups.
pub(in crate::aggregates) fn shrink_to_fit(&mut self) {
self.buffer.group_values.shrink_to_fit();
self.buffer.group_indices.clear();
self.buffer.group_indices.shrink_to_fit();
+ for acc in &mut self.buffer.accumulators {
+ acc.shrink_to_fit();
Review Comment:
I think this is the actual change to call shrink-to-fit on the accumulators
--
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]