Skip to content

Commit

Permalink
fix: missing properties (apache#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinlanhenke authored and shaeqahmed committed Dec 9, 2024
1 parent 0e8c32e commit 09bd9e1
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 09bd9e1

Please sign in to comment.