kevinjqliu commented on issue #1253:
URL: 
https://github.com/apache/iceberg-python/issues/1253#issuecomment-2440186317

   > The idea is to make the code simpler if we only want to evolve 
schema/spec/...
   i.e.
   ```
   with table.update_schema() as update:
       update.add_column("some_field", IntegerType(), "doc")
   ```
   instead of another with..transaction wrapper
   ```
   with table.transaction() as transaction:
       with transaction.update_schema() as update_schema:
           update.add_column("some_other_field", IntegerType(), "doc")
   ```
   ....
   
   
   What about moving the `autocommit` logic out of `Transaction` and into the 
class that uses it instead? 
   
   For example, `UpdateSchema` can implement `__enter__` and `__exit__` to 
commit the transaction automatically?
   
   Currently, these classes use `autocommit=True`:
   - ManageSnapshots
   - UpdateSchema
   - UpdateSpec


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