Skip to content

Conversation

@rambleraptor
Copy link
Contributor

Closes #1183

This adds a configurable namespace separator in the REST Catalog.

Rationale for this change

Certain implementations expect a different namespace separator.

Are these changes tested?

Tests included.

Are there any user-facing changes?

The REST spec currently uses %1F as the UTF-8 encoded namespace
separator for multi-part namespaces.
@rambleraptor rambleraptor requested a review from geruh December 15, 2025 18:36
@rambleraptor
Copy link
Contributor Author

@geruh thanks so much for your review! I've addressed your comments

@kevinjqliu
Copy link
Contributor

i was reviewing this and got distracted, a couple of times 😆

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this feature

Could you add an integration test against the iceberg-rest-fixture? Currently http://localhost:8181/v1/config returns

"overrides": {
    "namespace-separator": "%2E"
},

return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root), kind.value: identifier.name}
return {
"namespace": self._encode_namespace_path(tuple(identifier.namespace.root)),
kind.value: quote(identifier.name, safe=""),
Copy link
Contributor

Choose a reason for hiding this comment

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

curious why quote is used here

Comment on lines +234 to +237
separator_from_properties = self.properties.get(NAMESPACE_SEPARATOR_PROPERTY, DEFAULT_NAMESPACE_SEPARATOR)
if not separator_from_properties:
raise ValueError("Namespace separator cannot be an empty string")
self._namespace_separator = unquote(separator_from_properties)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we move this logic inside self._fetch_config()? since its part of the /v1/config flow to override the namespace separator

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.

Make REST Catalog Namespace Separator Configurable

3 participants