xanderbailey commented on code in PR #3042:
URL: https://github.com/apache/iceberg-rust/pull/3042#discussion_r3829183822
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -124,6 +125,17 @@ pub trait Catalog: Debug + Sync + Send {
async fn update_table(&self, commit: TableCommit) -> Result<Table>;
}
+/// Catalog operations that stage table creation in a transaction.
+#[async_trait]
+pub trait TransactionalCatalog: Catalog {
+ /// Start a transaction that creates a table when committed.
+ async fn create_table_transaction(
+ &self,
+ namespace: &NamespaceIdent,
+ creation: TableCreation,
+ ) -> Result<Transaction>;
+}
Review Comment:
The idea here is to make a clearer distinction for catalogs that are
transactional and may have different capabilities. The alternative I guess is
to have this on the catalog itself and fail at runtime for the catalogs that
don't support this.
--
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]