app/vmselect/promql: swap binary operation with modifier in the error message for improved readability

This commit is contained in:
Aliaksandr Valialkin 2019-06-12 17:14:18 +03:00
parent a71381ad2a
commit 88005237f4

View file

@ -296,7 +296,7 @@ func adjustBinaryOpTags(be *binaryOpExpr, left, right []*timeseries) ([]*timeser
if len(tss) == 1 { if len(tss) == 1 {
return nil return nil
} }
return fmt.Errorf(`duplicate timeseries on the %s side of %s %s: %s and %s`, side, be.GroupModifier.AppendString(nil), be.Op, return fmt.Errorf(`duplicate timeseries on the %s side of %s %s: %s and %s`, side, be.Op, be.GroupModifier.AppendString(nil),
stringMetricTags(&tss[0].MetricName), stringMetricTags(&tss[1].MetricName)) stringMetricTags(&tss[0].MetricName), stringMetricTags(&tss[1].MetricName))
} }
var rvsLeft, rvsRight []*timeseries var rvsLeft, rvsRight []*timeseries