mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 22:02:22 +08:00

duckdb temp storage of dataframes using parquet and querying from sql expressions --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
27 lines
393 B
Go
27 lines
393 B
Go
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
|
|
}
|
|
}
|