From ffd76eb41594416b366a17cdbc85112c68c01a17 Mon Sep 17 00:00:00 2001 From: Marvin Lanhenke <62298609+marvinlanhenke@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:04:20 +0100 Subject: [PATCH] fix: missing properties (#303) --- crates/catalog/hms/src/catalog.rs | 2 +- crates/catalog/hms/tests/hms_catalog_test.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/catalog/hms/src/catalog.rs b/crates/catalog/hms/src/catalog.rs index 4ca66bd21..2f545dd03 100644 --- a/crates/catalog/hms/src/catalog.rs +++ b/crates/catalog/hms/src/catalog.rs @@ -176,7 +176,7 @@ impl Catalog for HmsCatalog { .await .map_err(from_thrift_error)?; - Ok(Namespace::new(namespace.clone())) + Ok(Namespace::with_properties(namespace.clone(), properties)) } /// Retrieves a namespace by its identifier. diff --git a/crates/catalog/hms/tests/hms_catalog_test.rs b/crates/catalog/hms/tests/hms_catalog_test.rs index a48d0568c..3dd2c7d09 100644 --- a/crates/catalog/hms/tests/hms_catalog_test.rs +++ b/crates/catalog/hms/tests/hms_catalog_test.rs @@ -264,7 +264,6 @@ async fn test_list_namespace() -> Result<()> { async fn test_create_namespace() -> Result<()> { let fixture = set_test_fixture("test_create_namespace").await; - let ns = Namespace::new(NamespaceIdent::new("my_namespace".into())); let properties = HashMap::from([ ("comment".to_string(), "my_description".to_string()), ("location".to_string(), "my_location".to_string()), @@ -279,6 +278,11 @@ async fn test_create_namespace() -> Result<()> { ("key1".to_string(), "value1".to_string()), ]); + let ns = Namespace::with_properties( + NamespaceIdent::new("my_namespace".into()), + properties.clone(), + ); + let result = fixture .hms_catalog .create_namespace(ns.name(), properties)