Skip to content

Commit

Permalink
Merge branch 'main' into fix_440
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Jul 8, 2024
2 parents 096027a + 5e3937e commit e91c7a4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ impl Session {
let rows = conn.query_iter(PROMPT_SQL).await;
match rows {
Ok(mut rows) => {
while let Some(row) = rows.next().await {
let name: (String,) = row.unwrap().try_into().unwrap();
while let Some(Ok(row)) = rows.next().await {
let name: (String,) = row.try_into().unwrap();
keywords.push(name.0);
}
}
Expand Down
1 change: 1 addition & 0 deletions cli/tests/http/05-stream.result
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
27 changes: 27 additions & 0 deletions cli/tests/http/05-stream.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
## uncomment these when QUERY_DATABEND_ENTERPRISE_LICENSE env is set

# cat <<SQL | ${BENDSQL}
# CREATE DATABASE IF NOT EXISTS stream_test;

# CREATE OR REPLACE TABLE stream_test.abc
# (
# title VARCHAR,
# author VARCHAR,
# date VARCHAR
# );

# CREATE OR REPLACE STREAM stream_test.s on table stream_test.abc;
# SQL

# cat <<SQL | ${BENDSQL} -D stream_test
# DROP TABLE abc
# SQL

cat <<SQL | ${BENDSQL} -D stream_test
select 1;
SQL

cat <<SQL | ${BENDSQL}
DROP DATABASE IF EXISTS stream_test;
SQL
2 changes: 1 addition & 1 deletion sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ flight-sql = ["dep:arrow-array", "dep:arrow-schema", "dep:tonic"]
databend-client = { workspace = true }

chrono = { version = "0.4.35", default-features = false }
geozero = { version = "0.12", features = ["default", "with-wkb"] }
geozero = { version = "0.13", features = ["default", "with-wkb"] }
glob = "0.3"
itertools = "0.12"
jsonb = "0.4"
Expand Down

0 comments on commit e91c7a4

Please sign in to comment.