@@ -409,10 +409,7 @@ def _split_identifier_for_path(
409
409
self , identifier : Union [str , Identifier , TableIdentifier ], kind : IdentifierKind = IdentifierKind .TABLE
410
410
) -> Properties :
411
411
if isinstance (identifier , TableIdentifier ):
412
- if identifier .namespace .root [0 ] == self .name :
413
- return {"namespace" : NAMESPACE_SEPARATOR .join (identifier .namespace .root [1 :]), kind .value : identifier .name }
414
- else :
415
- return {"namespace" : NAMESPACE_SEPARATOR .join (identifier .namespace .root ), kind .value : identifier .name }
412
+ return {"namespace" : NAMESPACE_SEPARATOR .join (identifier .namespace .root ), kind .value : identifier .name }
416
413
identifier_tuple = self ._identifier_to_validated_tuple (identifier )
417
414
418
415
return {"namespace" : NAMESPACE_SEPARATOR .join (identifier_tuple [:- 1 ]), kind .value : identifier_tuple [- 1 ]}
@@ -578,6 +575,7 @@ def _create_table(
578
575
fresh_partition_spec = assign_fresh_partition_spec_ids (partition_spec , iceberg_schema , fresh_schema )
579
576
fresh_sort_order = assign_fresh_sort_order_ids (sort_order , iceberg_schema , fresh_schema )
580
577
578
+ identifier = self ._identifier_to_tuple_without_catalog (identifier )
581
579
namespace_and_table = self ._split_identifier_for_path (identifier )
582
580
if location :
583
581
location = location .rstrip ("/" )
@@ -659,6 +657,7 @@ def register_table(self, identifier: Union[str, Identifier], metadata_location:
659
657
Raises:
660
658
TableAlreadyExistsError: If the table already exists
661
659
"""
660
+ identifier = self ._identifier_to_tuple_without_catalog (identifier )
662
661
namespace_and_table = self ._split_identifier_for_path (identifier )
663
662
request = RegisterTableRequest (
664
663
name = namespace_and_table ["table" ],
0 commit comments