From 8e08c4a9f0ea19c20ff8960b4132fbad427a257a Mon Sep 17 00:00:00 2001 From: Grey Barkans Date: Wed, 14 Feb 2024 16:52:15 -0500 Subject: [PATCH 1/2] fix(virtual_listing): signatures A very minor fix to signatures for list_schemas and list_tables that I found while working on something else. --- .../sqlbuiltins/src/functions/table/virtual_listing.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/sqlbuiltins/src/functions/table/virtual_listing.rs b/crates/sqlbuiltins/src/functions/table/virtual_listing.rs index bd7df8290..9de78e412 100644 --- a/crates/sqlbuiltins/src/functions/table/virtual_listing.rs +++ b/crates/sqlbuiltins/src/functions/table/virtual_listing.rs @@ -46,6 +46,13 @@ impl ConstBuiltinFunction for ListSchemas { const DESCRIPTION: &'static str = "Lists schemas in a database"; const EXAMPLE: &'static str = "SELECT * FROM list_schemas('database')"; const FUNCTION_TYPE: FunctionType = FunctionType::TableReturning; + fn signature(&self) -> Option { + Some(Signature::uniform( + 1, + vec![DataType::Utf8], + Volatility::Stable, + )) + } } #[async_trait] @@ -103,7 +110,7 @@ impl ConstBuiltinFunction for ListTables { const FUNCTION_TYPE: FunctionType = FunctionType::TableReturning; fn signature(&self) -> Option { Some(Signature::uniform( - 3, + 2, vec![DataType::Utf8], Volatility::Stable, )) From 4cc35aac987fd1dd7776edb447badec9411ae537 Mon Sep 17 00:00:00 2001 From: Grey Date: Wed, 14 Feb 2024 20:47:32 -0500 Subject: [PATCH 2/2] Update crates/sqlbuiltins/src/functions/table/virtual_listing.rs Co-authored-by: Sam Kleinman --- crates/sqlbuiltins/src/functions/table/virtual_listing.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/sqlbuiltins/src/functions/table/virtual_listing.rs b/crates/sqlbuiltins/src/functions/table/virtual_listing.rs index 9de78e412..c08818e3d 100644 --- a/crates/sqlbuiltins/src/functions/table/virtual_listing.rs +++ b/crates/sqlbuiltins/src/functions/table/virtual_listing.rs @@ -46,6 +46,7 @@ impl ConstBuiltinFunction for ListSchemas { const DESCRIPTION: &'static str = "Lists schemas in a database"; const EXAMPLE: &'static str = "SELECT * FROM list_schemas('database')"; const FUNCTION_TYPE: FunctionType = FunctionType::TableReturning; + fn signature(&self) -> Option { Some(Signature::uniform( 1,