Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: HMS Catalog missing properties fn create_namespace #303

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading