From 3881c84afec3074ee23963fbc0d32d33aea908e6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 12 Oct 2020 11:39:44 +0300 Subject: [PATCH] Revert "app/vmselect/promql: remove metric name after applying `ceil`, `floor` and `round` functions in order to be more consistent with Prometheus" This reverts commit ac45082216f7ffaa46d8a1d0c51270a4fe1191ab. Reason for revert: the previous behavior for VictoriaMetrics is easier to understand and use by users - functions, which don't change the meaning of the time series shouldn't drop metric name. Now the following functions do not drop metric names: * ceil * floor * round Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/674 --- app/vmselect/promql/transform.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/vmselect/promql/transform.go b/app/vmselect/promql/transform.go index cc1e00027b..da0e66e733 100644 --- a/app/vmselect/promql/transform.go +++ b/app/vmselect/promql/transform.go @@ -18,8 +18,11 @@ import ( ) var transformFuncsKeepMetricGroup = map[string]bool{ + "ceil": true, "clamp_max": true, "clamp_min": true, + "floor": true, + "round": true, } var transformFuncs = map[string]transformFunc{