File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,7 @@ func buildRequestAggs(in []*storeapi.AggQuery) []AggQuery {
479479 GroupBy : agg .GroupBy ,
480480 Func : agg .Func .MustAggFunc (),
481481 Quantiles : agg .Quantiles ,
482+ Interval : seq .MID (agg .Interval ),
482483 })
483484 }
484485 return reqAggs
Original file line number Diff line number Diff line change @@ -181,12 +181,17 @@ func (g *grpcV1) DeleteAsyncSearch(
181181
182182func makeProtoRequestAggregations (sourceAggs []search.AggQuery ) []* seqproxyapi.AggQuery {
183183 aggs := make ([]* seqproxyapi.AggQuery , 0 , len (sourceAggs ))
184- for _ , agg := range sourceAggs {
184+ for _ , a := range sourceAggs {
185185 agg := & seqproxyapi.AggQuery {
186- Field : agg .Field ,
187- GroupBy : agg .GroupBy ,
188- Func : seqproxyapi .AggFunc (agg .Func ),
189- Quantiles : agg .Quantiles ,
186+ Field : a .Field ,
187+ GroupBy : a .GroupBy ,
188+ Func : seqproxyapi .AggFunc (a .Func ),
189+ Quantiles : a .Quantiles ,
190+ }
191+
192+ if a .Interval != 0 {
193+ interval := seq .MIDToDuration (a .Interval ).String ()
194+ agg .Interval = & interval
190195 }
191196
192197 // Support legacy format in which field means groupBy.
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ func convertAggQueriesToProto(query []processor.AggQuery) []*storeapi.AggQuery {
149149 if q .GroupBy != nil {
150150 pq .GroupBy = q .GroupBy .Field
151151 }
152+ if q .Interval != 0 {
153+ pq .Interval = q .Interval
154+ }
152155 res = append (res , pq )
153156 }
154157 return res
You can’t perform that action at this time.
0 commit comments