Fokko commented on code in PR #1278:
URL: https://github.com/apache/iceberg-python/pull/1278#discussion_r1827782795


##########
pyiceberg/catalog/rest.py:
##########
@@ -777,9 +778,15 @@ def commit_table(
         identifier = 
self._identifier_to_tuple_without_catalog(table.identifier)
         table_identifier = TableIdentifier(namespace=identifier[:-1], 
name=identifier[-1])
         table_request = CommitTableRequest(identifier=table_identifier, 
requirements=requirements, updates=updates)
+
+        headers = self._session.headers
+        if table_token := table.config.get("token"):

Review Comment:
   I'm not completely following. We want to override the `token` permanently, 
and only inject it when we commit for a table that has such a token. Otherwise:
   
   ```py
   t1 = catalog.load_table('t1')
   # Now the header is updated with the token for t1
   t2 = catalog.load_table('t2')
   # Now the header is updated with the token for t2
   
   with t1.transaction():
       # This will commit with the token of t2
   ```
   
   Did I miss anything?



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