SSE: Add noData type (#51973)
When there is a single frame with no fields (e.g. splunk datasource) SSE errors when trying to figure out the data type. This frame needs to exist since this is where the executedQueryString metadata exists. This adds a new return type to SSE to represent no data, so the original frame with its metadata can still be maintained.
This commit is contained in:
@@ -79,6 +79,32 @@ func Test_union(t *testing.T) {
|
||||
unionsAre: assert.EqualValues,
|
||||
unions: []*Union{},
|
||||
},
|
||||
{
|
||||
name: "empty result and data result will result in no unions",
|
||||
aResults: Results{
|
||||
Values: Values{
|
||||
makeSeries("a", data.Labels{"id": "1"}),
|
||||
},
|
||||
},
|
||||
bResults: Results{},
|
||||
unionsAre: assert.EqualValues,
|
||||
unions: []*Union{},
|
||||
},
|
||||
{
|
||||
name: "no data result and data result will result in no unions",
|
||||
aResults: Results{
|
||||
Values: Values{
|
||||
makeSeries("a", data.Labels{"id": "1"}),
|
||||
},
|
||||
},
|
||||
bResults: Results{
|
||||
Values: Values{
|
||||
NoData{}.New(),
|
||||
},
|
||||
},
|
||||
unionsAre: assert.EqualValues,
|
||||
unions: []*Union{},
|
||||
},
|
||||
{
|
||||
name: "incompatible tags of different length with will result in no unions when len(A) != 1 && len(B) != 1",
|
||||
aResults: Results{
|
||||
|
||||
Reference in New Issue
Block a user