summaryrefslogtreecommitdiff
path: root/internal/mapr/aggregateset.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-03 11:20:42 +0200
committerPaul Buetow <paul@buetow.org>2026-03-03 11:20:42 +0200
commit8762a54a74da48b304e49e23bd2b2eeb8f541f67 (patch)
treebba472803a19e370fcf24fe7d7c7f7b6c343f323 /internal/mapr/aggregateset.go
parent77661ef1c646a5ef8e6964afa5571c756d1fd31d (diff)
Add percentage and percentile mapr aggregators
Diffstat (limited to 'internal/mapr/aggregateset.go')
-rw-r--r--internal/mapr/aggregateset.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/mapr/aggregateset.go b/internal/mapr/aggregateset.go
index c50c7a1..263ef35 100644
--- a/internal/mapr/aggregateset.go
+++ b/internal/mapr/aggregateset.go
@@ -46,6 +46,10 @@ func (s *AggregateSet) Merge(query *Query, set *AggregateSet) error {
case Sum:
fallthrough
case Avg:
+ fallthrough
+ case Percentage:
+ fallthrough
+ case Percentile:
value := set.FValues[storage]
s.addFloat(storage, value)
case Min:
@@ -177,6 +181,10 @@ func (s *AggregateSet) Aggregate(key string, agg AggregateOperation, value strin
case Sum:
fallthrough
case Avg:
+ fallthrough
+ case Percentage:
+ fallthrough
+ case Percentile:
s.addFloat(key, f)
case Min:
s.addFloatMin(key, f)