mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 22:32:24 +08:00
Expressions: Sql expressions with Duckdb (#81666)
duckdb temp storage of dataframes using parquet and querying from sql expressions --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
26
pkg/expr/sql_command_test.go
Normal file
26
pkg/expr/sql_command_test.go
Normal file
@ -0,0 +1,26 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewCommand(t *testing.T) {
|
||||
cmd, err := NewSQLCommand("a", "select a from foo, bar", nil)
|
||||
if err != nil && strings.Contains(err.Error(), "feature is not enabled") {
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range cmd.varsToQuery {
|
||||
if strings.Contains("foo bar", v) {
|
||||
continue
|
||||
}
|
||||
t.Fail()
|
||||
return
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user