You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "CTTY (via GitHub)" <gi...@apache.org> on 2026/01/28 22:16:16 UTC

[PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

CTTY opened a new pull request, #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   - Closes #.
   
   ## What changes are included in this PR?
   
   <!--
   Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates.
   -->
   
   ## Are these changes tested?
   
   <!--
   Specify what test covers (unit test, integration test, etc.).
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739389397


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -366,63 +331,42 @@ pub trait FileWrite: Send + Unpin + 'static {
     async fn close(&mut self) -> crate::Result<()>;
 }
 
-#[async_trait::async_trait]
-impl FileWrite for opendal::Writer {
-    async fn write(&mut self, bs: Bytes) -> crate::Result<()> {
-        Ok(opendal::Writer::write(self, bs).await?)
-    }
-
-    async fn close(&mut self) -> crate::Result<()> {
-        let _ = opendal::Writer::close(self).await?;
-        Ok(())
-    }
-}
-
-#[async_trait::async_trait]
-impl FileWrite for Box<dyn FileWrite> {
-    async fn write(&mut self, bs: Bytes) -> crate::Result<()> {
-        self.as_mut().write(bs).await
-    }
-
-    async fn close(&mut self) -> crate::Result<()> {
-        self.as_mut().close().await
-    }
-}

Review Comment:
   Deleted this because we pass `Box<dyn FileWrite>` around and use boxed items directly.
   
   I updated `AsyncFileWriter` accordingly



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat!(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "blackmwk (via GitHub)" <gi...@apache.org>.
blackmwk merged PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739389397


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -366,63 +331,42 @@ pub trait FileWrite: Send + Unpin + 'static {
     async fn close(&mut self) -> crate::Result<()>;
 }
 
-#[async_trait::async_trait]
-impl FileWrite for opendal::Writer {
-    async fn write(&mut self, bs: Bytes) -> crate::Result<()> {
-        Ok(opendal::Writer::write(self, bs).await?)
-    }
-
-    async fn close(&mut self) -> crate::Result<()> {
-        let _ = opendal::Writer::close(self).await?;
-        Ok(())
-    }
-}
-
-#[async_trait::async_trait]
-impl FileWrite for Box<dyn FileWrite> {
-    async fn write(&mut self, bs: Bytes) -> crate::Result<()> {
-        self.as_mut().write(bs).await
-    }
-
-    async fn close(&mut self) -> crate::Result<()> {
-        self.as_mut().close().await
-    }
-}

Review Comment:
   Deleted this because we pass `Box<dyn FileWrite>` around and use boxed items directly



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739394006


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -433,9 +377,7 @@ impl OutputFile {
     /// Calling `write` will overwrite the file if it exists.
     /// For continuous writing, use [`Self::writer`].
     pub async fn write(&self, bs: Bytes) -> crate::Result<()> {
-        let mut writer = self.writer().await?;
-        writer.write(bs).await?;
-        writer.close().await
+        self.storage.write(&self.path, bs).await

Review Comment:
   This seems wrong, will fix it



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739394006


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -433,9 +377,7 @@ impl OutputFile {
     /// Calling `write` will overwrite the file if it exists.
     /// For continuous writing, use [`Self::writer`].
     pub async fn write(&self, bs: Bytes) -> crate::Result<()> {
-        let mut writer = self.writer().await?;
-        writer.write(bs).await?;
-        writer.close().await
+        self.storage.write(&self.path, bs).await

Review Comment:
   I think there is a minor behavior difference here. The new implementation calls `Operator::write` directly while the old one uses `Writer::write` and then explicitly closes it.
   
   According to [OpenDal's doc](https://docs.rs/opendal/latest/opendal/struct.Operator.html#method.write), the difference seems minor



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat!(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "blackmwk (via GitHub)" <gi...@apache.org>.
blackmwk commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2752207266


##########
crates/iceberg/src/io/storage.rs:
##########
@@ -154,41 +157,150 @@ pub trait StorageFactory: Debug + Send + Sync {
     fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>>;
 }
 
-/// The storage carries all supported storage services in iceberg
-#[derive(Debug)]
-pub(crate) enum OpenDalStorage {
+/// OpenDAL-based storage factory.
+///
+/// Maps scheme to the corresponding OpenDalStorage storage variant.
+///
+/// TODO this is currently not used, we still use OpenDalStorage::build() for now
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum OpenDalStorageFactory {
+    /// Memory storage factory.
     #[cfg(feature = "storage-memory")]
-    Memory(Operator),
+    Memory,
+    /// Local filesystem storage factory.
+    #[cfg(feature = "storage-fs")]
+    Fs,
+    /// S3 storage factory.
+    #[cfg(feature = "storage-s3")]
+    S3 {
+        /// Custom AWS credential loader.
+        #[serde(skip)]
+        customized_credential_load: Option<CustomAwsCredentialLoader>,
+    },
+    /// GCS storage factory.
+    #[cfg(feature = "storage-gcs")]
+    Gcs,
+    /// OSS storage factory.
+    #[cfg(feature = "storage-oss")]
+    Oss,
+    /// Azure Data Lake Storage factory.
+    #[cfg(feature = "storage-azdls")]
+    Azdls {
+        /// The configured Azure storage scheme.
+        configured_scheme: AzureStorageScheme,
+    },
+}
+
+#[typetag::serde(name = "OpenDalStorageFactory")]
+impl StorageFactory for OpenDalStorageFactory {
+    #[allow(unused_variables)]
+    fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>> {
+        match self {
+            #[cfg(feature = "storage-memory")]
+            OpenDalStorageFactory::Memory => Ok(Arc::new(OpenDalStorage::Memory(
+                super::memory_config_build()?,
+            ))),
+            #[cfg(feature = "storage-fs")]
+            OpenDalStorageFactory::Fs => Ok(Arc::new(OpenDalStorage::LocalFs)),
+            #[cfg(feature = "storage-s3")]
+            OpenDalStorageFactory::S3 {
+                customized_credential_load,
+            } => Ok(Arc::new(OpenDalStorage::S3 {
+                configured_scheme: "s3".to_string(),
+                config: super::s3_config_parse(config.props().clone())?.into(),
+                customized_credential_load: customized_credential_load.clone(),
+            })),
+            #[cfg(feature = "storage-gcs")]
+            OpenDalStorageFactory::Gcs => Ok(Arc::new(OpenDalStorage::Gcs {
+                config: super::gcs_config_parse(config.props().clone())?.into(),
+            })),
+            #[cfg(feature = "storage-oss")]
+            OpenDalStorageFactory::Oss => Ok(Arc::new(OpenDalStorage::Oss {
+                config: super::oss_config_parse(config.props().clone())?.into(),
+            })),
+            #[cfg(feature = "storage-azdls")]
+            OpenDalStorageFactory::Azdls { configured_scheme } => {
+                Ok(Arc::new(OpenDalStorage::Azdls {
+                    configured_scheme: configured_scheme.clone(),
+                    config: super::azdls_config_parse(config.props().clone())?.into(),
+                }))
+            }
+            #[cfg(all(
+                not(feature = "storage-memory"),
+                not(feature = "storage-fs"),
+                not(feature = "storage-s3"),
+                not(feature = "storage-gcs"),
+                not(feature = "storage-oss"),
+                not(feature = "storage-azdls"),
+            ))]
+            _ => Err(Error::new(
+                ErrorKind::FeatureUnsupported,
+                "No storage service has been enabled",
+            )),
+        }
+    }
+}
+
+/// Default memory operator for serde deserialization.
+#[cfg(feature = "storage-memory")]
+fn default_memory_operator() -> Operator {
+    super::memory_config_build().expect("Failed to create default memory operator")

Review Comment:
   I understand that it's difficult to avoid panic here, but please add a test to ensure that.



##########
crates/iceberg/src/io/storage.rs:
##########
@@ -154,41 +157,150 @@ pub trait StorageFactory: Debug + Send + Sync {
     fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>>;
 }
 
-/// The storage carries all supported storage services in iceberg
-#[derive(Debug)]
-pub(crate) enum OpenDalStorage {
+/// OpenDAL-based storage factory.
+///
+/// Maps scheme to the corresponding OpenDalStorage storage variant.
+///
+/// TODO this is currently not used, we still use OpenDalStorage::build() for now
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum OpenDalStorageFactory {

Review Comment:
   It would be better to move this to a opendal module?



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat!(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739394006


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -433,9 +377,7 @@ impl OutputFile {
     /// Calling `write` will overwrite the file if it exists.
     /// For continuous writing, use [`Self::writer`].
     pub async fn write(&self, bs: Bytes) -> crate::Result<()> {
-        let mut writer = self.writer().await?;
-        writer.write(bs).await?;
-        writer.close().await
+        self.storage.write(&self.path, bs).await

Review Comment:
   I think there is a minor behavior difference here. The new implementation calls `Operator::write` directly while the old one uses `Writer::write` and then explicitly closes it.
   
   According to [OpenDal's doc](https://docs.rs/opendal/latest/opendal/struct.Operator.html#method.write), the difference seems trivial



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739385743


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -291,59 +268,47 @@ pub trait FileRead: Send + Sync + Unpin + 'static {
     async fn read(&self, range: Range<u64>) -> crate::Result<Bytes>;
 }
 
-#[async_trait::async_trait]
-impl FileRead for opendal::Reader {
-    async fn read(&self, range: Range<u64>) -> crate::Result<Bytes> {
-        Ok(opendal::Reader::read(self, range).await?.to_bytes())
-    }
-}
-

Review Comment:
   Moved this to `storage.rs`, and will move this to `iceberg-storage/opendal/` in the future, because this is opendal specific



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739387690


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -366,63 +331,42 @@ pub trait FileWrite: Send + Unpin + 'static {
     async fn close(&mut self) -> crate::Result<()>;
 }
 
-#[async_trait::async_trait]
-impl FileWrite for opendal::Writer {
-    async fn write(&mut self, bs: Bytes) -> crate::Result<()> {
-        Ok(opendal::Writer::write(self, bs).await?)
-    }
-
-    async fn close(&mut self) -> crate::Result<()> {
-        let _ = opendal::Writer::close(self).await?;
-        Ok(())
-    }
-}

Review Comment:
   Same here, moved this to `storage.rs`, and will move this to `iceberg-storage/opendal/` in the future, because this is opendal specific



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739383831


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -105,13 +103,7 @@ impl FileIO {
     /// - If the path is a empty directory, this function will remove the directory itself.
     /// - If the path is a non-empty directory, this function will remove the directory and all nested files and directories.
     pub async fn remove_dir_all(&self, path: impl AsRef<str>) -> Result<()> {

Review Comment:
   We can rename this to `delete_prefix` as well



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2739429712


##########
crates/iceberg/src/io/file_io.rs:
##########
@@ -104,14 +102,8 @@ impl FileIO {
     /// - If the path is a file or not exist, this function will be no-op.
     /// - If the path is a empty directory, this function will remove the directory itself.
     /// - If the path is a non-empty directory, this function will remove the directory and all nested files and directories.
-    pub async fn remove_dir_all(&self, path: impl AsRef<str>) -> Result<()> {
-        let (op, relative_path) = self.inner.create_operator(&path)?;
-        let path = if relative_path.ends_with('/') {
-            relative_path.to_string()
-        } else {
-            format!("{relative_path}/")
-        };
-        Ok(op.remove_all(&path).await?)
+    pub async fn delete_prefix(&self, path: impl AsRef<str>) -> Result<()> {

Review Comment:
   This is a breaking change, the method is renamed to `delete_prefix`



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat!(io): Implement Storage for OpenDal [iceberg-rust]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2080:
URL: https://github.com/apache/iceberg-rust/pull/2080#discussion_r2752491522


##########
crates/iceberg/src/io/storage.rs:
##########
@@ -154,41 +157,150 @@ pub trait StorageFactory: Debug + Send + Sync {
     fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>>;
 }
 
-/// The storage carries all supported storage services in iceberg
-#[derive(Debug)]
-pub(crate) enum OpenDalStorage {
+/// OpenDAL-based storage factory.
+///
+/// Maps scheme to the corresponding OpenDalStorage storage variant.
+///
+/// TODO this is currently not used, we still use OpenDalStorage::build() for now
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum OpenDalStorageFactory {

Review Comment:
   This sounds good, I've moved opendal storage and related functions to a new module `opendal`



##########
crates/iceberg/src/io/storage.rs:
##########
@@ -154,41 +157,150 @@ pub trait StorageFactory: Debug + Send + Sync {
     fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>>;
 }
 
-/// The storage carries all supported storage services in iceberg
-#[derive(Debug)]
-pub(crate) enum OpenDalStorage {
+/// OpenDAL-based storage factory.
+///
+/// Maps scheme to the corresponding OpenDalStorage storage variant.
+///
+/// TODO this is currently not used, we still use OpenDalStorage::build() for now
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum OpenDalStorageFactory {
+    /// Memory storage factory.
     #[cfg(feature = "storage-memory")]
-    Memory(Operator),
+    Memory,
+    /// Local filesystem storage factory.
+    #[cfg(feature = "storage-fs")]
+    Fs,
+    /// S3 storage factory.
+    #[cfg(feature = "storage-s3")]
+    S3 {
+        /// Custom AWS credential loader.
+        #[serde(skip)]
+        customized_credential_load: Option<CustomAwsCredentialLoader>,
+    },
+    /// GCS storage factory.
+    #[cfg(feature = "storage-gcs")]
+    Gcs,
+    /// OSS storage factory.
+    #[cfg(feature = "storage-oss")]
+    Oss,
+    /// Azure Data Lake Storage factory.
+    #[cfg(feature = "storage-azdls")]
+    Azdls {
+        /// The configured Azure storage scheme.
+        configured_scheme: AzureStorageScheme,
+    },
+}
+
+#[typetag::serde(name = "OpenDalStorageFactory")]
+impl StorageFactory for OpenDalStorageFactory {
+    #[allow(unused_variables)]
+    fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>> {
+        match self {
+            #[cfg(feature = "storage-memory")]
+            OpenDalStorageFactory::Memory => Ok(Arc::new(OpenDalStorage::Memory(
+                super::memory_config_build()?,
+            ))),
+            #[cfg(feature = "storage-fs")]
+            OpenDalStorageFactory::Fs => Ok(Arc::new(OpenDalStorage::LocalFs)),
+            #[cfg(feature = "storage-s3")]
+            OpenDalStorageFactory::S3 {
+                customized_credential_load,
+            } => Ok(Arc::new(OpenDalStorage::S3 {
+                configured_scheme: "s3".to_string(),
+                config: super::s3_config_parse(config.props().clone())?.into(),
+                customized_credential_load: customized_credential_load.clone(),
+            })),
+            #[cfg(feature = "storage-gcs")]
+            OpenDalStorageFactory::Gcs => Ok(Arc::new(OpenDalStorage::Gcs {
+                config: super::gcs_config_parse(config.props().clone())?.into(),
+            })),
+            #[cfg(feature = "storage-oss")]
+            OpenDalStorageFactory::Oss => Ok(Arc::new(OpenDalStorage::Oss {
+                config: super::oss_config_parse(config.props().clone())?.into(),
+            })),
+            #[cfg(feature = "storage-azdls")]
+            OpenDalStorageFactory::Azdls { configured_scheme } => {
+                Ok(Arc::new(OpenDalStorage::Azdls {
+                    configured_scheme: configured_scheme.clone(),
+                    config: super::azdls_config_parse(config.props().clone())?.into(),
+                }))
+            }
+            #[cfg(all(
+                not(feature = "storage-memory"),
+                not(feature = "storage-fs"),
+                not(feature = "storage-s3"),
+                not(feature = "storage-gcs"),
+                not(feature = "storage-oss"),
+                not(feature = "storage-azdls"),
+            ))]
+            _ => Err(Error::new(
+                ErrorKind::FeatureUnsupported,
+                "No storage service has been enabled",
+            )),
+        }
+    }
+}
+
+/// Default memory operator for serde deserialization.
+#[cfg(feature = "storage-memory")]
+fn default_memory_operator() -> Operator {
+    super::memory_config_build().expect("Failed to create default memory operator")

Review Comment:
   Added an ut



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org