smaheshwar-pltr commented on code in PR #1961:
URL: https://github.com/apache/iceberg-python/pull/1961#discussion_r2071901642


##########
pyiceberg/table/__init__.py:
##########
@@ -774,13 +774,15 @@ def commit_transaction(self) -> Table:
                 updates=self._updates,
                 requirements=self._requirements,
             )
+            self._updates = ()

Review Comment:
   Nit: WDYT about rewriting to
   
   ```py
     def commit_transaction(self) -> Table:
         """Commit the changes to the catalog.
   
         Returns:
             The table with the updates applied.
         """
         if len(self._updates) > 0:
             self._requirements += 
(AssertTableUUID(uuid=self.table_metadata.table_uuid),)
             self._table._do_commit(  # pylint: disable=W0212
                 updates=self._updates,
                 requirements=self._requirements,
             )
   
         self._updates = ()
         self._requirements = ()
   
         return self._table
   ```



##########
pyiceberg/table/__init__.py:
##########
@@ -774,13 +774,15 @@ def commit_transaction(self) -> Table:
                 updates=self._updates,
                 requirements=self._requirements,
             )
+            self._updates = ()

Review Comment:
   Nit: WDYT about rewriting this method as
   
   ```py
     def commit_transaction(self) -> Table:
         """Commit the changes to the catalog.
   
         Returns:
             The table with the updates applied.
         """
         if len(self._updates) > 0:
             self._requirements += 
(AssertTableUUID(uuid=self.table_metadata.table_uuid),)
             self._table._do_commit(  # pylint: disable=W0212
                 updates=self._updates,
                 requirements=self._requirements,
             )
   
         self._updates = ()
         self._requirements = ()
   
         return self._table
   ```



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