From a8d22e12233de3598599cea5b5bbda762bbeb7d2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 31 Jan 2022 22:06:05 +0200 Subject: [PATCH] app/vmselect/promql: check for binary operation in case-insensitive manner when deciding which side of the operation to perform the first PromQL and MetricsQL operators are case-insensitive --- app/vmselect/promql/eval.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index ce6a7ccb5..cf8322cc5 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -283,7 +283,7 @@ func evalExpr(ec *EvalConfig, e metricsql.Expr) ([]*timeseries, error) { } var err error var tssLeft, tssRight []*timeseries - switch be.Op { + switch strings.ToLower(be.Op) { case "and", "if": // Fetch right-side series at first, since the left side of `and` and `if` operator // usually contains lower number of time series. This should produce more specific label filters