Expr: Make math expression scalars compliant with dataplane contract (#90350)
* Specify frame type for scalars arbitrarily * Update alerting tests which assert on entire dataframe fields
This commit is contained in:
@@ -88,7 +88,10 @@ func (s Scalar) AsDataFrame() *data.Frame { return s.Frame }
|
||||
func NewScalar(name string, f *float64) Scalar {
|
||||
frame := data.NewFrame("",
|
||||
data.NewField(name, nil, []*float64{f}),
|
||||
)
|
||||
).SetMeta(&data.FrameMeta{
|
||||
Type: data.FrameTypeNumericMulti,
|
||||
TypeVersion: data.FrameTypeVersion{0, 1},
|
||||
})
|
||||
return Scalar{frame}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user