From 827b463380449920114b6100f3b3f23975784ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20EIckler?= <797483+eickler@users.noreply.github.com> Date: Mon, 29 Dec 2025 15:40:48 +0100 Subject: [PATCH 1/2] fix: MemoryCatalog to return absolute NamespaceIdents --- crates/iceberg/src/catalog/memory/catalog.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/iceberg/src/catalog/memory/catalog.rs b/crates/iceberg/src/catalog/memory/catalog.rs index cfa3dc6b52..d54288718f 100644 --- a/crates/iceberg/src/catalog/memory/catalog.rs +++ b/crates/iceberg/src/catalog/memory/catalog.rs @@ -163,7 +163,11 @@ impl Catalog for MemoryCatalog { let namespaces = root_namespace_state .list_namespaces_under(parent_namespace_ident)? .into_iter() - .map(|name| NamespaceIdent::new(name.to_string())) + .map(|name| { + let mut names = parent_namespace_ident.iter().cloned().collect::>(); + names.push(name.to_string()); + NamespaceIdent::from_vec(names).unwrap() + }) .collect_vec(); Ok(namespaces) @@ -599,7 +603,7 @@ pub(crate) mod tests { .list_namespaces(Some(&namespace_ident_1)) .await .unwrap(), - vec![NamespaceIdent::new("b".into())] + vec![namespace_ident_2] ); } @@ -628,9 +632,9 @@ pub(crate) mod tests { .unwrap() ), to_set(vec![ - NamespaceIdent::new("a".into()), - NamespaceIdent::new("b".into()), - NamespaceIdent::new("c".into()), + namespace_ident_2, + namespace_ident_3, + namespace_ident_4, ]) ); } From 5f8a34c1e09b15e2a781b4847e99db8cbfe0f0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20EIckler?= <797483+eickler@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:25:15 +0100 Subject: [PATCH 2/2] refactor: Replace unwrap() with error return --- crates/iceberg/src/catalog/memory/catalog.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/iceberg/src/catalog/memory/catalog.rs b/crates/iceberg/src/catalog/memory/catalog.rs index d54288718f..df0299acb2 100644 --- a/crates/iceberg/src/catalog/memory/catalog.rs +++ b/crates/iceberg/src/catalog/memory/catalog.rs @@ -166,9 +166,9 @@ impl Catalog for MemoryCatalog { .map(|name| { let mut names = parent_namespace_ident.iter().cloned().collect::>(); names.push(name.to_string()); - NamespaceIdent::from_vec(names).unwrap() + NamespaceIdent::from_vec(names) }) - .collect_vec(); + .collect::>>()?; Ok(namespaces) }