kevinjqliu commented on code in PR #1580:
URL: https://github.com/apache/iceberg-python/pull/1580#discussion_r1930765272


##########
pyiceberg/catalog/hive.py:
##########
@@ -404,7 +404,22 @@ def register_table(self, identifier: Union[str, 
Identifier], metadata_location:
         Raises:
             TableAlreadyExistsError: If the table already exists
         """
-        raise NotImplementedError
+        database_name, table_name = 
self.identifier_to_database_and_table(identifier)
+        io = self._load_file_io(location=metadata_location)
+        metadata_file = io.new_input(metadata_location)
+        staged_table = StagedTable(
+            identifier=(database_name, table_name),
+            metadata=FromInputFile.table_metadata(metadata_file),
+            metadata_location=metadata_location,
+            io=io,
+            catalog=self,
+        )
+        tbl = self._convert_iceberg_into_hive(staged_table)
+        with self._client as open_client:

Review Comment:
   we'd have to acquire a hive lock here
   
https://github.com/apache/iceberg-python/blob/985029042199d870f25b6fbec0e80907d4440f41/pyiceberg/catalog/hive.py#L462-L463



-- 
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]

Reply via email to