@@ -31,7 +31,9 @@ use datafusion::error::Result;
3131use datafusion:: prelude:: * ;
3232use datafusion_common:: { cast:: as_float64_array, DataFusionError , ScalarValue } ;
3333use datafusion_expr:: {
34- function:: { AccumulatorArgs , StateFieldsArgs } , groups_accumulator:: GroupIndices , Accumulator , AggregateUDF , AggregateUDFImpl , GroupsAccumulator , Signature
34+ function:: { AccumulatorArgs , StateFieldsArgs } ,
35+ groups_accumulator:: GroupIndices ,
36+ Accumulator , AggregateUDF , AggregateUDFImpl , GroupsAccumulator , Signature ,
3537} ;
3638
3739/// This example shows how to use the full AggregateUDFImpl API to implement a user
@@ -279,9 +281,11 @@ impl GroupsAccumulator for GeometricMeanGroupsAccumulator {
279281
280282 let group_indices = match group_indices {
281283 GroupIndices :: Flat ( idxs) => idxs,
282- GroupIndices :: Blocked ( _) => return Err ( DataFusionError :: NotImplemented (
283- "blocked states management is not supported" . to_string ( ) ) ,
284- ) ,
284+ GroupIndices :: Blocked ( _) => {
285+ return Err ( DataFusionError :: NotImplemented (
286+ "blocked states management is not supported" . to_string ( ) ,
287+ ) )
288+ }
285289 } ;
286290
287291 let values = values[ 0 ] . as_primitive :: < Float64Type > ( ) ;
@@ -318,9 +322,11 @@ impl GroupsAccumulator for GeometricMeanGroupsAccumulator {
318322
319323 let group_indices = match group_indices {
320324 GroupIndices :: Flat ( idxs) => idxs,
321- GroupIndices :: Blocked ( _) => return Err ( DataFusionError :: NotImplemented (
322- "blocked states management is not supported" . to_string ( ) ) ,
323- ) ,
325+ GroupIndices :: Blocked ( _) => {
326+ return Err ( DataFusionError :: NotImplemented (
327+ "blocked states management is not supported" . to_string ( ) ,
328+ ) )
329+ }
324330 } ;
325331
326332 // first batch is counts, second is partial sums
0 commit comments