rambleraptor commented on code in PR #2826:
URL: https://github.com/apache/iceberg-python/pull/2826#discussion_r2662953236
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -382,10 +399,16 @@ def _split_identifier_for_path(
self, identifier: str | Identifier | TableIdentifier, kind:
IdentifierKind = IdentifierKind.TABLE
) -> Properties:
if isinstance(identifier, TableIdentifier):
- 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=""),
Review Comment:
What if the namespace separator has a '/' in it? We need to make sure that
it isn't interpreted as part of the path.
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -382,10 +399,16 @@ def _split_identifier_for_path(
self, identifier: str | Identifier | TableIdentifier, kind:
IdentifierKind = IdentifierKind.TABLE
) -> Properties:
if isinstance(identifier, TableIdentifier):
- 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=""),
Review Comment:
What if the namespace separator has a '/' in it? We need to make sure that
it isn't interpreted as part of the path.
Added a comment to make this clearer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]