@@ -363,7 +363,7 @@ impl AggregateUDFImpl for Count {
363363 if !args. is_distinct {
364364 return Ok ( Box :: new ( CountGroupsAccumulator :: new ( ) ) ) ;
365365 }
366- create_distinct_count_groups_accumulator ( args)
366+ create_distinct_count_groups_accumulator ( & args)
367367 }
368368
369369 fn reverse_expr ( & self ) -> ReversedUDAF {
@@ -438,34 +438,34 @@ impl AggregateUDFImpl for Count {
438438
439439#[ cold]
440440fn create_distinct_count_groups_accumulator (
441- args : AccumulatorArgs ,
441+ args : & AccumulatorArgs ,
442442) -> Result < Box < dyn GroupsAccumulator > > {
443443 let data_type = args. expr_fields [ 0 ] . data_type ( ) ;
444444 match data_type {
445445 DataType :: Int8 => Ok ( Box :: new (
446446 PrimitiveDistinctCountGroupsAccumulator :: < Int8Type > :: new ( ) ,
447447 ) ) ,
448- DataType :: Int16 => Ok ( Box :: new (
449- PrimitiveDistinctCountGroupsAccumulator :: < Int16Type > :: new ( ) ,
450- ) ) ,
451- DataType :: Int32 => Ok ( Box :: new (
452- PrimitiveDistinctCountGroupsAccumulator :: < Int32Type > :: new ( ) ,
453- ) ) ,
454- DataType :: Int64 => Ok ( Box :: new (
455- PrimitiveDistinctCountGroupsAccumulator :: < Int64Type > :: new ( ) ,
456- ) ) ,
457- DataType :: UInt8 => Ok ( Box :: new (
458- PrimitiveDistinctCountGroupsAccumulator :: < UInt8Type > :: new ( ) ,
459- ) ) ,
460- DataType :: UInt16 => Ok ( Box :: new (
461- PrimitiveDistinctCountGroupsAccumulator :: < UInt16Type > :: new ( ) ,
462- ) ) ,
463- DataType :: UInt32 => Ok ( Box :: new (
464- PrimitiveDistinctCountGroupsAccumulator :: < UInt32Type > :: new ( ) ,
465- ) ) ,
466- DataType :: UInt64 => Ok ( Box :: new (
467- PrimitiveDistinctCountGroupsAccumulator :: < UInt64Type > :: new ( ) ,
468- ) ) ,
448+ DataType :: Int16 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
449+ Int16Type ,
450+ > :: new ( ) ) ) ,
451+ DataType :: Int32 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
452+ Int32Type ,
453+ > :: new ( ) ) ) ,
454+ DataType :: Int64 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
455+ Int64Type ,
456+ > :: new ( ) ) ) ,
457+ DataType :: UInt8 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
458+ UInt8Type ,
459+ > :: new ( ) ) ) ,
460+ DataType :: UInt16 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
461+ UInt16Type ,
462+ > :: new ( ) ) ) ,
463+ DataType :: UInt32 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
464+ UInt32Type ,
465+ > :: new ( ) ) ) ,
466+ DataType :: UInt64 => Ok ( Box :: new ( PrimitiveDistinctCountGroupsAccumulator :: <
467+ UInt64Type ,
468+ > :: new ( ) ) ) ,
469469 _ => not_impl_err ! (
470470 "GroupsAccumulator not supported for COUNT(DISTINCT) with {}" ,
471471 data_type
0 commit comments