@@ -577,7 +577,6 @@ def _create_table(
577577 fresh_partition_spec = assign_fresh_partition_spec_ids (partition_spec , iceberg_schema , fresh_schema )
578578 fresh_sort_order = assign_fresh_sort_order_ids (sort_order , iceberg_schema , fresh_schema )
579579
580- identifier = self ._identifier_to_tuple_without_catalog (identifier )
581580 namespace_and_table = self ._split_identifier_for_path (identifier )
582581 if location :
583582 location = location .rstrip ("/" )
@@ -658,7 +657,6 @@ def register_table(self, identifier: Union[str, Identifier], metadata_location:
658657 Raises:
659658 TableAlreadyExistsError: If the table already exists
660659 """
661- identifier = self ._identifier_to_tuple_without_catalog (identifier )
662660 namespace_and_table = self ._split_identifier_for_path (identifier )
663661 request = RegisterTableRequest (
664662 name = namespace_and_table ["table" ],
@@ -701,11 +699,8 @@ def load_table(self, identifier: Union[str, Identifier]) -> Table:
701699
702700 @retry (** _RETRY_ARGS )
703701 def drop_table (self , identifier : Union [str , Identifier ], purge_requested : bool = False ) -> None :
704- identifier_tuple = self ._identifier_to_tuple_without_catalog (identifier )
705702 response = self ._session .delete (
706- self .url (
707- Endpoints .drop_table , prefixed = True , purge = purge_requested , ** self ._split_identifier_for_path (identifier_tuple )
708- ),
703+ self .url (Endpoints .drop_table , prefixed = True , purge = purge_requested , ** self ._split_identifier_for_path (identifier )),
709704 )
710705 try :
711706 response .raise_for_status ()
@@ -718,9 +713,8 @@ def purge_table(self, identifier: Union[str, Identifier]) -> None:
718713
719714 @retry (** _RETRY_ARGS )
720715 def rename_table (self , from_identifier : Union [str , Identifier ], to_identifier : Union [str , Identifier ]) -> Table :
721- from_identifier_tuple = self ._identifier_to_tuple_without_catalog (from_identifier )
722716 payload = {
723- "source" : self ._split_identifier_for_json (from_identifier_tuple ),
717+ "source" : self ._split_identifier_for_json (from_identifier ),
724718 "destination" : self ._split_identifier_for_json (to_identifier ),
725719 }
726720 response = self ._session .post (self .url (Endpoints .rename_table ), json = payload )
@@ -877,9 +871,8 @@ def table_exists(self, identifier: Union[str, Identifier]) -> bool:
877871 Returns:
878872 bool: True if the table exists, False otherwise.
879873 """
880- identifier_tuple = self ._identifier_to_tuple_without_catalog (identifier )
881874 response = self ._session .head (
882- self .url (Endpoints .load_table , prefixed = True , ** self ._split_identifier_for_path (identifier_tuple ))
875+ self .url (Endpoints .load_table , prefixed = True , ** self ._split_identifier_for_path (identifier ))
883876 )
884877
885878 if response .status_code == 404 :
@@ -896,11 +889,8 @@ def table_exists(self, identifier: Union[str, Identifier]) -> bool:
896889
897890 @retry (** _RETRY_ARGS )
898891 def drop_view (self , identifier : Union [str ]) -> None :
899- identifier_tuple = self ._identifier_to_tuple_without_catalog (identifier )
900892 response = self ._session .delete (
901- self .url (
902- Endpoints .drop_view , prefixed = True , ** self ._split_identifier_for_path (identifier_tuple , IdentifierKind .VIEW )
903- ),
893+ self .url (Endpoints .drop_view , prefixed = True , ** self ._split_identifier_for_path (identifier , IdentifierKind .VIEW )),
904894 )
905895 try :
906896 response .raise_for_status ()
0 commit comments