This is an automated email from the ASF dual-hosted git repository.
liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new ffd76eb fix: missing properties (#303)
ffd76eb is described below
commit ffd76eb41594416b366a17cdbc85112c68c01a17
Author: Marvin Lanhenke <[email protected]>
AuthorDate: Tue Mar 26 10:04:20 2024 +0100
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 4ca66bd..2f545dd 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 a48d056..3dd2c7d 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)