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:
Roman Khavronenko 2021-09-29 00:35:14 +03:00 committed by GitHub
parent 50ec259750
commit 03cd93bf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1112,13 +1112,6 @@ func newRollupQuantile(args []interface{}) (rollupFunc, error) {
// There is no need in handling NaNs here, since they must be cleaned up
// before calling rollup funcs.
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]
qv := quantile(phi, values)
return qv