Skip to content

Commit

Permalink
Runtime: fixes panic in ValidateMetricsView (#4241)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul authored Mar 5, 2024
1 parent eb5aa24 commit 8b0cfc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions runtime/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ func (r *Runtime) ValidateMetricsView(ctx context.Context, instanceID string, mv
f, ok := fields[strings.ToLower(mv.TimeDimension)]
if !ok {
res.TimeDimensionErr = fmt.Errorf("timeseries %q is not a column in table %q", mv.TimeDimension, mv.Table)
}
if f.Type.Code != runtimev1.Type_CODE_TIMESTAMP && f.Type.Code != runtimev1.Type_CODE_DATE {
} else if f.Type.Code != runtimev1.Type_CODE_TIMESTAMP && f.Type.Code != runtimev1.Type_CODE_DATE {
res.TimeDimensionErr = fmt.Errorf("timeseries %q is not a TIMESTAMP column", mv.TimeDimension)
}
}
Expand Down

0 comments on commit 8b0cfc4

Please sign in to comment.