Rich-T-kid commented on code in PR #23262:
URL: https://github.com/apache/datafusion/pull/23262#discussion_r3501179461
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/mod.rs:
##########
@@ -1117,7 +1117,7 @@ impl<const STREAMING: bool> GroupValues for
GroupValuesColumn<STREAMING> {
// a real Result rather than panicking.
let fresh = Self::build_group_columns(&self.schema)?;
let group_values = mem::replace(&mut self.group_values, fresh);
-
+ self.map.clear();
Review Comment:
Not exactly,the [map's
capacity](https://docs.rs/hashbrown/latest/hashbrown/struct.HashMap.html#method.clear)
is preserved. This gives the caller a correctness guarantee: emit will never
leave GroupValuesColumn in an intermediate or inconsistent state.
--
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]