Skip to content

Commit

Permalink
fix: missing properties (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinlanhenke committed Mar 26, 2024
1 parent e196725 commit ffd76eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/catalog/hms/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion crates/catalog/hms/tests/hms_catalog_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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)
Expand Down

0 comments on commit ffd76eb

Please sign in to comment.