SSE: Support time series frames with non-nullable float64 values (#32608)

* SSE: fix reduce to handle non-null
* add type for data.Field that is float64 or *float64
* resample fix for non-null input case, add couple non-null tests
This commit is contained in:
Kyle Brandt
2021-04-01 14:33:35 -04:00
committed by GitHub
parent d42a5b2561
commit 512faa7c9c
7 changed files with 167 additions and 115 deletions
+28
View File
@@ -77,6 +77,34 @@ func TestResampleSeries(t *testing.T) {
unixTimePointer(15, 0), float64Pointer(2),
}),
},
{
name: "resample series: downsampling (mean / pad) (no-nullable)",
interval: time.Second * 5,
downsampler: "mean",
upsampler: "pad",
timeRange: backend.TimeRange{
From: time.Unix(0, 0),
To: time.Unix(16, 0),
},
seriesToResample: makeNoNullSeries("", nil, noNullTP{
time.Unix(2, 0), 2,
}, noNullTP{
time.Unix(4, 0), 3,
}, noNullTP{
time.Unix(7, 0), 1,
}, noNullTP{
time.Unix(9, 0), 2,
}),
series: makeSeriesNullableTime("", nil, nullTimeTP{
unixTimePointer(0, 0), nil,
}, nullTimeTP{
unixTimePointer(5, 0), float64Pointer(2.5),
}, nullTimeTP{
unixTimePointer(10, 0), float64Pointer(1.5),
}, nullTimeTP{
unixTimePointer(15, 0), float64Pointer(2),
}),
},
{
name: "resample series: downsampling (max / fillna)",
interval: time.Second * 5,