[v11.0.x] fix: sql expressions - sql parser table name case (#87305)

fix: sql expressions - sql parser table name case (#87196)

* fix: sql parser table name case

(cherry picked from commit 4fd2cb6014)

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-05-03 15:58:23 +03:00
committed by GitHub
co-authored by Scott Lepper
parent 5b5032c7b8
commit 1c801e283f
3 changed files with 64 additions and 15 deletions
+5 -1
View File
@@ -74,7 +74,11 @@ func (gr *SQLCommand) Execute(ctx context.Context, now time.Time, vars mathexp.V
allFrames := []*data.Frame{}
for _, ref := range gr.varsToQuery {
results := vars[ref]
results, ok := vars[ref]
if !ok {
logger.Warn("no results found for", "ref", ref)
continue
}
frames := results.Values.AsDataFrames(ref)
allFrames = append(allFrames, frames...)
}