lliangyu-lin commented on code in PR #1623:
URL: https://github.com/apache/iceberg-rust/pull/1623#discussion_r2305524433


##########
crates/iceberg/src/catalog/memory/catalog.rs:
##########
@@ -28,28 +28,103 @@ use crate::io::FileIO;
 use crate::spec::{TableMetadata, TableMetadataBuilder};
 use crate::table::Table;
 use crate::{
-    Catalog, Error, ErrorKind, MetadataLocation, Namespace, NamespaceIdent, 
Result, TableCommit,
-    TableCreation, TableIdent,
+    Catalog, CatalogBuilder, Error, ErrorKind, MetadataLocation, Namespace, 
NamespaceIdent, Result,
+    TableCommit, TableCreation, TableIdent,
 };
 
+/// Memory catalog warehouse location
+pub const MEMORY_CATALOG_WAREHOUSE: &str = "warehouse";
+
 /// namespace `location` property
 const LOCATION: &str = "location";
 
+/// Builder for [`MemoryCatalog`].
+#[derive(Debug)]
+pub struct MemoryCatalogBuilder(MemoryCatalogConfig);
+
+impl Default for MemoryCatalogBuilder {
+    fn default() -> Self {
+        Self(MemoryCatalogConfig {
+            name: None,
+            warehouse: "".to_string(),
+            props: HashMap::new(),
+        })
+    }
+}
+
+impl CatalogBuilder for MemoryCatalogBuilder {
+    type C = MemoryCatalog;
+
+    fn load(
+        mut self,
+        name: impl Into<String>,
+        props: HashMap<String, String>,
+    ) -> impl Future<Output = Result<Self::C>> + Send {
+        self.0.name = Some(name.into());
+
+        // if props.contains_key(MEMORY_CATALOG_IO_TYPE) {

Review Comment:
   Missed it. Will remove 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]

Reply via email to