(result interface{}, err error)
| 220 | } |
| 221 | |
| 222 | func (a *AggSumAggregator) Add(result interface{}, err error) error { |
| 223 | if err != nil { |
| 224 | a.err.CompareAndSwap(nil, err) |
| 225 | } |
| 226 | |
| 227 | if result != nil { |
| 228 | val, err := toFloat64(result) |
| 229 | if err != nil { |
| 230 | a.err.CompareAndSwap(nil, err) |
| 231 | return err |
| 232 | } |
| 233 | a.res.Add(val) |
| 234 | } |
| 235 | |
| 236 | return nil |
| 237 | } |
| 238 | |
| 239 | func (a *AggSumAggregator) BatchAdd(results map[string]AggregatorResErr) error { |
| 240 | var sum int64 |
no test coverage detected