From 5794c052c18ee59845642f843cdf263f35e04b61 Mon Sep 17 00:00:00 2001 From: sundyli <543950155@qq.com> Date: Thu, 4 Jul 2024 12:12:42 +0800 Subject: [PATCH 1/2] fix(session): PROMPT_SQL unwrap (#445) --- cli/src/session.rs | 4 ++-- cli/tests/http/05-stream.result | 1 + cli/tests/http/05-stream.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 cli/tests/http/05-stream.result create mode 100644 cli/tests/http/05-stream.sh diff --git a/cli/src/session.rs b/cli/src/session.rs index 28772675..8075085c 100644 --- a/cli/src/session.rs +++ b/cli/src/session.rs @@ -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); } } diff --git a/cli/tests/http/05-stream.result b/cli/tests/http/05-stream.result new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/cli/tests/http/05-stream.result @@ -0,0 +1 @@ +1 diff --git a/cli/tests/http/05-stream.sh b/cli/tests/http/05-stream.sh new file mode 100644 index 00000000..e2d5dad0 --- /dev/null +++ b/cli/tests/http/05-stream.sh @@ -0,0 +1,27 @@ +#!/bin/bash +## uncomment these when QUERY_DATABEND_ENTERPRISE_LICENSE env is set + +# cat < Date: Sun, 7 Jul 2024 00:09:35 +0800 Subject: [PATCH 2/2] chore: Bump geozero to 0.13 (#448) --- sql/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/Cargo.toml b/sql/Cargo.toml index ced3693e..3096fe28 100644 --- a/sql/Cargo.toml +++ b/sql/Cargo.toml @@ -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"