SQL Expressions: Query Service Support (#101955)
--------- Co-authored-by: Adam Simpson <adam@adamsimpson.net> Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
This commit is contained in:
co-authored by
Adam Simpson
Sarah Zinger
parent
370f4c2bcd
commit
4a0ec27e5d
@@ -381,11 +381,14 @@ func (b *QueryAPIBuilder) handleExpressions(ctx context.Context, req parsedReque
|
||||
if !ok {
|
||||
dr, ok := qdr.Responses[refId]
|
||||
if ok {
|
||||
_, res, err := b.converter.Convert(ctx, req.RefIDTypes[refId], dr.Frames)
|
||||
_, isSqlInput := req.SqlInputs[refId]
|
||||
|
||||
_, res, err := b.converter.Convert(ctx, req.RefIDTypes[refId], dr.Frames, isSqlInput)
|
||||
if err != nil {
|
||||
expressionsLogger.Error("error converting frames for expressions", "error", err)
|
||||
res.Error = err
|
||||
}
|
||||
|
||||
vars[refId] = res
|
||||
} else {
|
||||
expressionsLogger.Error("missing variable in handle expressions", "refId", refId, "expressionRefId", expression.RefID)
|
||||
@@ -427,7 +430,7 @@ func (b *QueryAPIBuilder) convertQueryWithoutExpression(ctx context.Context, req
|
||||
return nil, fmt.Errorf("refID '%s' does not exist", refID)
|
||||
}
|
||||
frames := qdr.Responses[refID].Frames
|
||||
_, results, err := b.converter.Convert(ctx, req.PluginId, frames)
|
||||
_, results, err := b.converter.Convert(ctx, req.PluginId, frames, false)
|
||||
if err != nil {
|
||||
results.Error = err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user