From e5202a4eaee52b3bf03f59fabdc09a84352857c4 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 4dc668ef2..b838cc57d 100644 --- a/app/vmselect/promql/exec_test.go +++ b/app/vmselect/promql/exec_test.go @@ -3602,7 +3602,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 fc61c9f7c..851b76de4 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) {