From 75bff1a567cf7b4b996da0b8e309411347b9a931 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 6 Aug 2020 23:27:46 +0300 Subject: [PATCH] app/vmselect/promql: remove metric name from results of certain rollup functions in order to be consistent with Prometheus Rollup functions: - avg_over_time - min_over_time - max_over_time - quantile_over_time This improves VictoriaMetrics results at https://promlabs.com/promql-compliance-test-results-victoriametrics/ --- app/vmselect/promql/exec_test.go | 1 - app/vmselect/promql/rollup.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/app/vmselect/promql/exec_test.go b/app/vmselect/promql/exec_test.go index 1bb91e2d6d..36570bf34f 100644 --- a/app/vmselect/promql/exec_test.go +++ b/app/vmselect/promql/exec_test.go @@ -3612,7 +3612,6 @@ func TestExecSuccess(t *testing.T) { Values: []float64{6.8, 8.8, 10.9, 12.9, 14.9, 16.9}, Timestamps: timestampsExpected, } - r.MetricName.MetricGroup = []byte("foobar") resultExpected := []netstorage.Result{r} f(q, resultExpected) }) diff --git a/app/vmselect/promql/rollup.go b/app/vmselect/promql/rollup.go index fc61c9f7ca..851b76de49 100644 --- a/app/vmselect/promql/rollup.go +++ b/app/vmselect/promql/rollup.go @@ -168,17 +168,11 @@ var rollupFuncsRemoveCounterResets = map[string]bool{ var rollupFuncsKeepMetricGroup = map[string]bool{ "default_rollup": true, - "avg_over_time": true, - "min_over_time": true, - "max_over_time": true, - "quantile_over_time": true, "rollup": true, - "geomean_over_time": true, "hoeffding_bound_lower": true, "hoeffding_bound_upper": true, "first_over_time": true, "last_over_time": true, - "mode_over_time": true, } func getRollupAggrFuncNames(expr metricsql.Expr) ([]string, error) {