Skip to content

Commit be49384

Browse files
committed
Add namespace exists
1 parent 4e922fe commit be49384

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

pyiceberg/catalog/rest/__init__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -532,17 +532,6 @@ def _check_valid_namespace_identifier(self, identifier: str | Identifier) -> Ide
532532
raise NoSuchNamespaceError(f"Empty namespace identifier: {identifier}")
533533
return identifier_tuple
534534

535-
def _encode_namespace_path(self, namespace: Identifier) -> str:
536-
"""Encode the namespace identifier into a path string.
537-
538-
Args:
539-
namespace: Namespace identifier.
540-
541-
Returns:
542-
The encoded namespace path string.
543-
"""
544-
return NAMESPACE_SEPARATOR.join(namespace)
545-
546535
def url(self, endpoint: str, prefixed: bool = True, **kwargs: Any) -> str:
547536
"""Construct the endpoint.
548537
@@ -1117,7 +1106,7 @@ def update_namespace_properties(
11171106
@retry(**_RETRY_ARGS)
11181107
def namespace_exists(self, namespace: str | Identifier) -> bool:
11191108
namespace_tuple = self._check_valid_namespace_identifier(namespace)
1120-
namespace = self._encode_namespace_path(namespace_tuple)
1109+
namespace = NAMESPACE_SEPARATOR.join(namespace_tuple)
11211110

11221111
# fallback in order to work with older rest catalog implementations
11231112
if Capability.V1_NAMESPACE_EXISTS not in self._supported_endpoints:

0 commit comments

Comments
 (0)