syun64 commented on code in PR #498:
URL: https://github.com/apache/iceberg-python/pull/498#discussion_r1513218389


##########
pyiceberg/catalog/glue.py:
##########
@@ -358,6 +365,33 @@ def _get_glue_table(self, database_name: str, table_name: 
str) -> TableTypeDef:
         except self.glue.exceptions.EntityNotFoundException as e:
             raise NoSuchTableError(f"Table does not exist: 
{database_name}.{table_name}") from e
 
+    def _create_staged_table(

Review Comment:
   I think we might have an opportunity here to move **_create_staged_table** 
function into 
[pyiceberg/catalog/__init__.py](https://github.com/apache/iceberg-python/blob/main/pyiceberg/catalog/__init__.py)
 and refactor the existing **create_table** functions on the different catalog 
implementations to all use **_create_staged_table** to create an instance of 
the StagedTable, and then commit that StagedTable to the catalog backend. 
   
   I think what sets each catalog's implementation of **create_table** apart is 
how it handles the commit against the catalog backened, but they all seem to 
share the same sequence of operations in how it instantiates its notion of a 
new table.
   
   What are your thoughts on this idea @HonahX ?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to