From 68e70d992a304ea692a496fe43a3ad2f7af14cc0 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Tue, 26 Apr 2016 14:31:00 +0100 Subject: [PATCH] Clarify error message around on(x) group_left(x) --- promql/ast.go | 2 +- promql/parse.go | 2 +- promql/parse_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/promql/ast.go b/promql/ast.go index 35719afc2..f8eaa3e15 100644 --- a/promql/ast.go +++ b/promql/ast.go @@ -235,7 +235,7 @@ type VectorMatching struct { // rather than only using them. Ignoring bool // Include contains additional labels that should be included in - // the result from the side with the higher cardinality. + // the result from the side with the lower cardinality. Include model.LabelNames } diff --git a/promql/parse.go b/promql/parse.go index 79cd37aeb..38911775f 100644 --- a/promql/parse.go +++ b/promql/parse.go @@ -486,7 +486,7 @@ func (p *parser) expr() Expr { for _, ln := range vecMatching.MatchingLabels { for _, ln2 := range vecMatching.Include { if ln == ln2 && !vecMatching.Ignoring { - p.errorf("label %q must not occur in ON and INCLUDE clause at once", ln) + p.errorf("label %q must not occur in ON and GROUP clause at once", ln) } } } diff --git a/promql/parse_test.go b/promql/parse_test.go index 94f06d7e0..e5d1ea8a3 100644 --- a/promql/parse_test.go +++ b/promql/parse_test.go @@ -757,7 +757,7 @@ var testExpr = []struct { }, { input: `http_requests{group="production"} + on(instance) group_left(job,instance) cpu_count{type="smp"}`, fail: true, - errMsg: "label \"instance\" must not occur in ON and INCLUDE clause at once", + errMsg: "label \"instance\" must not occur in ON and GROUP clause at once", }, { input: "foo + bool bar", fail: true,