diff --git a/promql/ast.go b/promql/ast.go index 35719afc2d..f8eaa3e159 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 79cd37aeb9..38911775f8 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 94f06d7e08..e5d1ea8a37 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,