Skip to content

Commit

Permalink
Measure filter validation (#4109)
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-ryashin authored Feb 20, 2024
1 parent 669eecd commit 99a4bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/queries/metricsview_aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ func (q *MetricsViewAggregation) buildMetricsAggregationSQL(mv *runtimev1.Metric
filterCount++
}
}
if filterCount > 1 {
return "", nil, errors.New("multiple measure filters")
if filterCount != 0 && len(q.Measures) > 1 {
return "", nil, errors.New("multiple measures with filter")
}
if filterCount == 1 && len(q.PivotOn) > 0 {
return "", nil, errors.New("measure filter for pivot-on")
Expand Down

0 comments on commit 99a4bc4

Please sign in to comment.