mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: rm quantile_over_time
fast-path optimisations (#1662)
The removed fast path optimisations weren't consistent with `quantile` function behavior and results into discrepancy. Specifically, results didn't match in cases when: * 0 < phi > 1; * values contain only one element. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
50ec259750
commit
03cd93bf1a
1 changed files with 0 additions and 7 deletions
|
@ -1112,13 +1112,6 @@ func newRollupQuantile(args []interface{}) (rollupFunc, error) {
|
||||||
// There is no need in handling NaNs here, since they must be cleaned up
|
// There is no need in handling NaNs here, since they must be cleaned up
|
||||||
// before calling rollup funcs.
|
// before calling rollup funcs.
|
||||||
values := rfa.values
|
values := rfa.values
|
||||||
if len(values) == 0 {
|
|
||||||
return rfa.prevValue
|
|
||||||
}
|
|
||||||
if len(values) == 1 {
|
|
||||||
// Fast path - only a single value.
|
|
||||||
return values[0]
|
|
||||||
}
|
|
||||||
phi := phis[rfa.idx]
|
phi := phis[rfa.idx]
|
||||||
qv := quantile(phi, values)
|
qv := quantile(phi, values)
|
||||||
return qv
|
return qv
|
||||||
|
|
Loading…
Reference in a new issue