Skip to content

Commit

Permalink
Correct passing of Grouping/Without to count_values
Browse files Browse the repository at this point in the history
Previously `count_values` was dropping all Grouping labels in its
aggregation.

Fixes #283
  • Loading branch information
jacksontj committed Mar 11, 2020
1 parent 396483a commit 72f2586
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/proxystorage/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ func (p *ProxyStorage) NodeReplacer(ctx context.Context, s *promql.EvalStmt, nod
return &promql.AggregateExpr{
Op: promql.ItemSum,
Expr: ret,
Grouping: []string{n.Param.(*promql.StringLiteral).Val},
Grouping: append(n.Grouping, n.Param.(*promql.StringLiteral).Val),
Without: n.Without,
}, nil

case promql.ItemQuantile:
Expand Down

0 comments on commit 72f2586

Please sign in to comment.