This commit is contained in:
Łukasz Mierzwa 2025-03-05 13:42:29 -06:00 committed by GitHub
commit 6bdb790de0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3947,6 +3947,26 @@ var testExpr = []struct {
},
},
},
{
input: "(sum(foo))",
expected: &ParenExpr{
Expr: &AggregateExpr{
Op: SUM,
Expr: &VectorSelector{
Name: "foo",
LabelMatchers: []*labels.Matcher{
MustLabelMatcher(labels.MatchEqual, model.MetricNameLabel, "foo"),
},
PosRange: posrange.PositionRange{
Start: 5,
End: 8,
},
},
PosRange: posrange.PositionRange{Start: 1, End: 9},
},
PosRange: posrange.PositionRange{Start: 0, End: 10},
},
},
}
func makeInt64Pointer(val int64) *int64 {