Skip to content

Conversation

@eickler
Copy link
Contributor

@eickler eickler commented Dec 29, 2025

Which issue does this PR close?

What changes are included in this PR?

The change makes list_namespaces(parent) return an absolute namespace identifier instead of a relative.

Are these changes tested?

The associated unit tests are updated with the same behaviour as SqlCatalog.

@eickler
Copy link
Contributor Author

eickler commented Dec 29, 2025

Note: I am currently trying to fix the Datafusion integration to work with nested namespaces. As part of unit testing using MemoryCatalog, I encountered this small issue. I read in the discussions that you prefer smaller PRs over larger ones, so I took the liberty of submitting it like this.

Copy link
Collaborator

@CTTY CTTY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Just a minor comment

.map(|name| {
let mut names = parent_namespace_ident.iter().cloned().collect::<Vec<_>>();
names.push(name.to_string());
NamespaceIdent::from_vec(names).unwrap()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should propgate the error rather than unwrapping it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I have only started with Rust. I thought unwrap() would be reasonable here since names is guaranteed to have at least one element and the result can only be Err if names has no elements.

I could terminate on the first error and return the error. Is that better?

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eickler for this fix, and @CTTY for review.

@liurenjie1024 liurenjie1024 merged commit a405414 into apache:main Dec 30, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MemoryCatalog returns relative namespace identifiers rather than absolute

3 participants