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:
Kyle Brandt
2022-07-14 09:18:12 -04:00
committed by GitHub
parent 5d199a40b7
commit 05fd7eb047
5 changed files with 88 additions and 2 deletions
+4
View File
@@ -401,6 +401,8 @@ const (
TypeSeriesSet
// TypeVariantSet is a collection of the same type Number, Series, or Scalar.
TypeVariantSet
// TypeNoData is a no data response without a known data type.
TypeNoData
)
// String returns a string representation of the ReturnType.
@@ -416,6 +418,8 @@ func (f ReturnType) String() string {
return "scalar"
case TypeVariantSet:
return "variant"
case TypeNoData:
return "noData"
default:
return "unknown"
}