@@ -596,7 +596,7 @@ impl TimeSum {
596596}
597597
598598impl Accumulator for TimeSum {
599- fn state ( & mut self ) -> Result < Vec < ScalarValue > > {
599+ fn state ( & self ) -> Result < Vec < ScalarValue > > {
600600 Ok ( vec ! [ self . evaluate( ) ?] )
601601 }
602602
@@ -617,7 +617,7 @@ impl Accumulator for TimeSum {
617617 self . update_batch ( states)
618618 }
619619
620- fn evaluate ( & mut self ) -> Result < ScalarValue > {
620+ fn evaluate ( & self ) -> Result < ScalarValue > {
621621 Ok ( ScalarValue :: TimestampNanosecond ( Some ( self . sum ) , None ) )
622622 }
623623
@@ -740,12 +740,12 @@ impl FirstSelector {
740740}
741741
742742impl Accumulator for FirstSelector {
743- fn state ( & mut self ) -> Result < Vec < ScalarValue > > {
743+ fn state ( & self ) -> Result < Vec < ScalarValue > > {
744744 self . evaluate ( ) . map ( |s| vec ! [ s] )
745745 }
746746
747747 /// produce the output structure
748- fn evaluate ( & mut self ) -> Result < ScalarValue > {
748+ fn evaluate ( & self ) -> Result < ScalarValue > {
749749 self . to_state ( )
750750 }
751751
@@ -838,15 +838,15 @@ impl Accumulator for TestGroupsAccumulator {
838838 Ok ( ( ) )
839839 }
840840
841- fn evaluate ( & mut self ) -> Result < ScalarValue > {
841+ fn evaluate ( & self ) -> Result < ScalarValue > {
842842 Ok ( ScalarValue :: from ( self . result ) )
843843 }
844844
845845 fn size ( & self ) -> usize {
846846 size_of :: < u64 > ( )
847847 }
848848
849- fn state ( & mut self ) -> Result < Vec < ScalarValue > > {
849+ fn state ( & self ) -> Result < Vec < ScalarValue > > {
850850 Ok ( vec ! [ ScalarValue :: from( self . result) ] )
851851 }
852852
@@ -977,7 +977,7 @@ impl Accumulator for MetadataBasedAccumulator {
977977 Ok ( ( ) )
978978 }
979979
980- fn evaluate ( & mut self ) -> Result < ScalarValue > {
980+ fn evaluate ( & self ) -> Result < ScalarValue > {
981981 let v = match self . double_output {
982982 true => self . curr_sum * 2 ,
983983 false => self . curr_sum ,
@@ -990,7 +990,7 @@ impl Accumulator for MetadataBasedAccumulator {
990990 9
991991 }
992992
993- fn state ( & mut self ) -> Result < Vec < ScalarValue > > {
993+ fn state ( & self ) -> Result < Vec < ScalarValue > > {
994994 Ok ( vec ! [ ScalarValue :: from( self . curr_sum) ] )
995995 }
996996
0 commit comments