Make tsdb dataframes response able to carry encoded/decoded frames (#25454)

Make tsdb dataframes response able to carry encoded and/or decoded frames
This commit is contained in:
Marcus Efraimsson
2020-06-09 13:13:06 +02:00
committed by GitHub
parent de1dc57242
commit 53175a41c9
10 changed files with 104 additions and 56 deletions

View File

@@ -41,25 +41,11 @@ func (e *CloudWatchExecutor) executeLogActions(ctx context.Context, queryContext
return err
}
encodedFrames := make([][]byte, 0)
for _, frame := range groupedFrames {
dataframeEnc, err := frame.MarshalArrow()
if err != nil {
return err
}
encodedFrames = append(encodedFrames, dataframeEnc)
}
resultChan <- &tsdb.QueryResult{RefId: query.RefId, Dataframes: encodedFrames}
resultChan <- &tsdb.QueryResult{RefId: query.RefId, Dataframes: tsdb.NewDecodedDataFrames(groupedFrames)}
return nil
}
dataframeEnc, err := dataframe.MarshalArrow()
if err != nil {
return err
}
resultChan <- &tsdb.QueryResult{RefId: query.RefId, Dataframes: [][]byte{dataframeEnc}}
resultChan <- &tsdb.QueryResult{RefId: query.RefId, Dataframes: tsdb.NewDecodedDataFrames(data.Frames{dataframe})}
return nil
})
}