From 8f731571076e8821885b83506af963a376ab67af Mon Sep 17 00:00:00 2001 From: Ruslan Nigmatullin Date: Tue, 17 Dec 2024 11:01:38 -0800 Subject: [PATCH] add comment for removing zeros --- .../deltatocumulativeprocessor/internal/data/expo/merge.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/processor/deltatocumulativeprocessor/internal/data/expo/merge.go b/processor/deltatocumulativeprocessor/internal/data/expo/merge.go index c7b72f9360b8..82536ea1fa7e 100644 --- a/processor/deltatocumulativeprocessor/internal/data/expo/merge.go +++ b/processor/deltatocumulativeprocessor/internal/data/expo/merge.go @@ -22,6 +22,9 @@ func Merge(arel, brel Buckets) { lo := min(a.Lower(), b.Lower()) up := max(a.Upper(), b.Upper()) + + // Skip leading and trailing zeros to reduce number of buckets. + // As we cap number of buckets this allows us to have higher scale. for lo < up && a.Abs(lo) == 0 && b.Abs(lo) == 0 { lo++ }