From 2009918ab27916d3ffb1ed62dcf1cd2460081b64 Mon Sep 17 00:00:00 2001 From: Runji Wang Date: Tue, 20 Feb 2024 14:22:24 +0800 Subject: [PATCH] revert: varchar -> boolean, varchar -> bigint there is a bug when query in extended mode, the format may be binary, but we always output in text. Signed-off-by: Runji Wang --- src/frontend/src/handler/cancel_job.rs | 4 ++-- src/frontend/src/handler/show.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/handler/cancel_job.rs b/src/frontend/src/handler/cancel_job.rs index 0f4358373a45..278e01e3e1bc 100644 --- a/src/frontend/src/handler/cancel_job.rs +++ b/src/frontend/src/handler/cancel_job.rs @@ -34,7 +34,7 @@ pub(super) async fn handle_cancel( .await?; let rows = canceled_jobs .into_iter() - .map(|id| CancelRow { id: id as i32 }); + .map(|id| CancelRow { id: id.to_string() }); Ok(PgResponse::builder(StatementType::CANCEL_COMMAND) .rows(rows) .into()) @@ -43,5 +43,5 @@ pub(super) async fn handle_cancel( #[derive(Fields)] #[fields(style = "Title Case")] struct CancelRow { - id: i32, + id: String, } diff --git a/src/frontend/src/handler/show.rs b/src/frontend/src/handler/show.rs index 92f082a61dcb..226a219a1188 100644 --- a/src/frontend/src/handler/show.rs +++ b/src/frontend/src/handler/show.rs @@ -117,7 +117,7 @@ struct ShowObjectRow { pub struct ShowColumnRow { pub name: String, pub r#type: String, - pub is_hidden: Option, + pub is_hidden: Option, pub description: Option, } @@ -135,7 +135,7 @@ impl ShowColumnRow { ShowColumnRow { name: c.name, r#type: type_name, - is_hidden: Some(col.is_hidden), + is_hidden: Some(col.is_hidden.to_string()), description: c.description, } })