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/
This commit is contained in:
Aliaksandr Valialkin 2020-08-06 23:27:46 +03:00
parent 8835004a4c
commit 75bff1a567
2 changed files with 0 additions and 7 deletions

View File

@ -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)
})

View File

@ -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) {