@@ -237,14 +237,12 @@ func (a *AggSumAggregator) BatchAdd(results map[string]AggregatorResErr) error {
237237
238238 for _ , res := range results {
239239 if res .Err != nil {
240- a .Add (res .Result , res .Err )
241- return nil
240+ return a .Add (res .Result , res .Err )
242241 }
243242
244243 intRes , err := toInt64 (res )
245244 if err != nil {
246- a .Add (nil , err )
247- return nil
245+ return a .Add (nil , err )
248246 }
249247
250248 sum += intRes
@@ -262,14 +260,12 @@ func (a *AggSumAggregator) BatchSlice(results []AggregatorResErr) error {
262260
263261 for _ , res := range results {
264262 if res .Err != nil {
265- a .Add (res .Result , res .Err )
266- return nil
263+ return a .Add (res .Result , res .Err )
267264 }
268265
269266 intRes , err := toInt64 (res )
270267 if err != nil {
271- a .Add (nil , err )
272- return nil
268+ return a .Add (nil , err )
273269 }
274270
275271 sum += intRes
@@ -494,7 +490,7 @@ func (a *AggLogicalAndAggregator) Add(result interface{}, err error) error {
494490}
495491
496492func (a * AggLogicalAndAggregator ) BatchAdd (results map [string ]AggregatorResErr ) error {
497- var result bool = true
493+ result : = true
498494
499495 for _ , res := range results {
500496 if res .Err != nil {
@@ -517,7 +513,7 @@ func (a *AggLogicalAndAggregator) AddWithKey(key string, result interface{}, err
517513}
518514
519515func (a * AggLogicalAndAggregator ) BatchSlice (results []AggregatorResErr ) error {
520- var result bool = true
516+ result : = true
521517
522518 for _ , res := range results {
523519 if res .Err != nil {
@@ -578,7 +574,7 @@ func (a *AggLogicalOrAggregator) Add(result interface{}, err error) error {
578574}
579575
580576func (a * AggLogicalOrAggregator ) BatchAdd (results map [string ]AggregatorResErr ) error {
581- var result bool = false
577+ result : = false
582578
583579 for _ , res := range results {
584580 if res .Err != nil {
@@ -601,7 +597,7 @@ func (a *AggLogicalOrAggregator) AddWithKey(key string, result interface{}, err
601597}
602598
603599func (a * AggLogicalOrAggregator ) BatchSlice (results []AggregatorResErr ) error {
604- var result bool = false
600+ result : = false
605601
606602 for _ , res := range results {
607603 if res .Err != nil {
0 commit comments