File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
native/spark-expr/src/agg_funcs Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -467,14 +467,17 @@ impl GroupsAccumulator for SumIntGroupsAccumulator {
467467 }
468468 }
469469
470- fn state ( & mut self , _emit_to : EmitTo ) -> DFResult < Vec < ArrayRef > > {
470+ fn state ( & mut self , emit_to : EmitTo ) -> DFResult < Vec < ArrayRef > > {
471+ let sums = emit_to. take_needed ( & mut self . sums ) ;
472+
471473 if self . eval_mode == EvalMode :: Try {
474+ let has_all_nulls = emit_to. take_needed ( & mut self . has_all_nulls ) ;
472475 Ok ( vec ! [
473- Arc :: new( Int64Array :: from( self . sums. clone ( ) ) ) ,
474- Arc :: new( BooleanArray :: from( self . has_all_nulls. clone ( ) ) ) ,
476+ Arc :: new( Int64Array :: from( sums) ) ,
477+ Arc :: new( BooleanArray :: from( has_all_nulls) ) ,
475478 ] )
476479 } else {
477- Ok ( vec ! [ Arc :: new( Int64Array :: from( self . sums. clone ( ) ) ) ] )
480+ Ok ( vec ! [ Arc :: new( Int64Array :: from( sums) ) ] )
478481 }
479482 }
480483
You can’t perform that action at this time.
0 commit comments