mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
app/vmselect/promql: return the correct time series from quantile
Previously arbitrary time series could be returned from `quantile` depending on sort order for the last data point in the selected range. Fix this by returning the calculated time series. Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/55
This commit is contained in:
parent
5a5ba749f2
commit
1458450dba
1 changed files with 1 additions and 0 deletions
|
@ -457,6 +457,7 @@ func newAggrQuantileFunc(phis []float64) func(tss []*timeseries) []*timeseries {
|
||||||
idx := int(math.Round(float64(len(tss)-1) * phi))
|
idx := int(math.Round(float64(len(tss)-1) * phi))
|
||||||
dst.Values[n] = tss[idx].Values[n]
|
dst.Values[n] = tss[idx].Values[n]
|
||||||
}
|
}
|
||||||
|
tss[0] = dst
|
||||||
return tss[:1]
|
return tss[:1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue