diff --git a/tests/cases/standalone/select/dummy.output b/tests/cases/standalone/select/dummy.output new file mode 100644 index 0000000000..e0ac9dc3f0 --- /dev/null +++ b/tests/cases/standalone/select/dummy.output @@ -0,0 +1,36 @@ +select 1; + ++--------------------------+ +| Int64(1), #Field, #Int64 | ++--------------------------+ +| 1 | ++--------------------------+ + +select 2 + 3; + ++----------------------------------------+ +| Int64(2) Plus Int64(3), #Field, #Int64 | ++----------------------------------------+ +| 5 | ++----------------------------------------+ + +select 4 + 0.5; + ++----------------------------------------------+ +| Int64(4) Plus Float64(0.5), #Field, #Float64 | ++----------------------------------------------+ +| 4.5 | ++----------------------------------------------+ + +select "a"; + +Failed to execute, error: Datanode { code: 3000, msg: "Failed to execute sql, source: Cannot plan SQL: SELECT \"a\", source: Error during planning: Invalid identifier '#a' for schema fields:[], metadata:{}" } + +select "A"; + +Failed to execute, error: Datanode { code: 3000, msg: "Failed to execute sql, source: Cannot plan SQL: SELECT \"A\", source: Error during planning: Invalid identifier '#A' for schema fields:[], metadata:{}" } + +select * where "a" = "A"; + +Failed to execute, error: Datanode { code: 3000, msg: "Failed to execute sql, source: Cannot plan SQL: SELECT * WHERE \"a\" = \"A\", source: Error during planning: Invalid identifier '#a' for schema fields:[], metadata:{}" } + diff --git a/tests/cases/standalone/select/dummy.sql b/tests/cases/standalone/select/dummy.sql new file mode 100644 index 0000000000..97d975b2e2 --- /dev/null +++ b/tests/cases/standalone/select/dummy.sql @@ -0,0 +1,11 @@ +select 1; + +select 2 + 3; + +select 4 + 0.5; + +select "a"; + +select "A"; + +select * where "a" = "A"; diff --git a/tests/runner/src/env.rs b/tests/runner/src/env.rs index 94fdc84088..c8b571e7fb 100644 --- a/tests/runner/src/env.rs +++ b/tests/runner/src/env.rs @@ -35,8 +35,8 @@ impl Environment for Env { async fn start(&self, mode: &str, _config: Option) -> Self::DB { match mode { - "local" => Self::start_local().await, - "remote" => Self::start_remote().await, + "standalone" => Self::start_standalone().await, + "distributed" => Self::start_distributed().await, _ => panic!("Unexpected mode: {}", mode), } } @@ -48,7 +48,7 @@ impl Environment for Env { } impl Env { - pub async fn start_local() -> GreptimeDB { + pub async fn start_standalone() -> GreptimeDB { let server_process = Command::new("cargo") .current_dir("../") .args(["run", "--", "standalone", "start"]) @@ -67,7 +67,7 @@ impl Env { } } - pub async fn start_remote() -> GreptimeDB { + pub async fn start_distributed() -> GreptimeDB { todo!() } }