Xuanwo commented on code in PR #1261:
URL: https://github.com/apache/iceberg-rust/pull/1261#discussion_r2113919972


##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -96,6 +97,18 @@ pub trait Catalog: Debug + Sync + Send {
     async fn update_table(&self, commit: TableCommit) -> Result<Table>;
 }
 
+/// Common interface for all catalog builders.
+pub trait CatalogBuilder: Default + Debug + Send + Sync {
+    /// The catalog type that this builder creates.
+    type C: Catalog;
+    /// Create a new catalog instance.
+    fn load(
+        self,
+        name: impl Into<String>,

Review Comment:
   Since `name` won't be a bottleneck, how about just using `&str`?



##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -96,6 +97,18 @@ pub trait Catalog: Debug + Sync + Send {
     async fn update_table(&self, commit: TableCommit) -> Result<Table>;
 }
 
+/// Common interface for all catalog builders.
+pub trait CatalogBuilder: Default + Debug + Send + Sync {
+    /// The catalog type that this builder creates.
+    type C: Catalog;
+    /// Create a new catalog instance.
+    fn load(

Review Comment:
   How about simply using `async fn`? It's not a big thing for us to place with 
`Send` I guess.



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