Dandandan commented on code in PR #8721:
URL: https://github.com/apache/arrow-datafusion/pull/8721#discussion_r1440115934
##########
datafusion/physical-expr/src/aggregate/count_distinct.rs:
##########
@@ -192,20 +285,175 @@ impl Accumulator for DistinctCountAccumulator {
}
}
+struct DistinctCountGroupsAccumulator<T>
+where
+ T: ArrowPrimitiveType + Send,
+{
+ /// Vector for storing unique values sets for each group index
+ unique_values: Vec<HashSet<Hashable<T::Native>>>,
Review Comment:
I hoped we could store this in something like `HashSet<(usize, T::Native)>`,
i.e. we could ammortize the allocations for all the groups instead of creating
a hashset for each group.
--
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]