This is an automated email from the ASF dual-hosted git repository.

liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 5d07594be feat(io): Rename Storage to OpenDalStorage (#2059)
5d07594be is described below

commit 5d07594becbe9d774105b208c87a4bd9aae68065
Author: Shawn Chang <[email protected]>
AuthorDate: Wed Jan 21 17:17:20 2026 -0800

    feat(io): Rename Storage to OpenDalStorage (#2059)
    
    ## Which issue does this PR close?
    
    - Closes #2052
    
    ## What changes are included in this PR?
    - Rename Storage to OpenDalStorage so we can introduce Storage trait
    later
    
    
    ## Are these changes tested?
    Relies on existing tests
---
 crates/iceberg/src/io/file_io.rs |  6 +++---
 crates/iceberg/src/io/storage.rs | 16 ++++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/crates/iceberg/src/io/file_io.rs b/crates/iceberg/src/io/file_io.rs
index 24e91ca8a..ef9f8aa93 100644
--- a/crates/iceberg/src/io/file_io.rs
+++ b/crates/iceberg/src/io/file_io.rs
@@ -24,7 +24,7 @@ use bytes::Bytes;
 use opendal::Operator;
 use url::Url;
 
-use super::storage::Storage;
+use super::storage::OpenDalStorage;
 use crate::{Error, ErrorKind, Result};
 
 /// FileIO implementation, used to manipulate files in underlying storage.
@@ -48,7 +48,7 @@ use crate::{Error, ErrorKind, Result};
 pub struct FileIO {
     builder: FileIOBuilder,
 
-    inner: Arc<Storage>,
+    inner: Arc<OpenDalStorage>,
 }
 
 impl FileIO {
@@ -262,7 +262,7 @@ impl FileIOBuilder {
 
     /// Builds [`FileIO`].
     pub fn build(self) -> Result<FileIO> {
-        let storage = Storage::build(self.clone())?;
+        let storage = OpenDalStorage::build(self.clone())?;
         Ok(FileIO {
             builder: self,
             inner: Arc::new(storage),
diff --git a/crates/iceberg/src/io/storage.rs b/crates/iceberg/src/io/storage.rs
index 03e43600d..32a95eb1d 100644
--- a/crates/iceberg/src/io/storage.rs
+++ b/crates/iceberg/src/io/storage.rs
@@ -43,7 +43,7 @@ use crate::{Error, ErrorKind};
 
 /// The storage carries all supported storage services in iceberg
 #[derive(Debug)]
-pub(crate) enum Storage {
+pub(crate) enum OpenDalStorage {
     #[cfg(feature = "storage-memory")]
     Memory(Operator),
     #[cfg(feature = "storage-fs")]
@@ -73,7 +73,7 @@ pub(crate) enum Storage {
     },
 }
 
-impl Storage {
+impl OpenDalStorage {
     /// Convert iceberg config to opendal config.
     pub(crate) fn build(file_io_builder: FileIOBuilder) -> crate::Result<Self> 
{
         let (scheme_str, props, extensions) = file_io_builder.into_parts();
@@ -137,7 +137,7 @@ impl Storage {
         let _ = path;
         let (operator, relative_path): (Operator, &str) = match self {
             #[cfg(feature = "storage-memory")]
-            Storage::Memory(op) => {
+            OpenDalStorage::Memory(op) => {
                 if let Some(stripped) = path.strip_prefix("memory:/") {
                     Ok::<_, crate::Error>((op.clone(), stripped))
                 } else {
@@ -145,7 +145,7 @@ impl Storage {
                 }
             }
             #[cfg(feature = "storage-fs")]
-            Storage::LocalFs => {
+            OpenDalStorage::LocalFs => {
                 let op = super::fs_config_build()?;
 
                 if let Some(stripped) = path.strip_prefix("file:/") {
@@ -155,7 +155,7 @@ impl Storage {
                 }
             }
             #[cfg(feature = "storage-s3")]
-            Storage::S3 {
+            OpenDalStorage::S3 {
                 configured_scheme,
                 config,
                 customized_credential_load,
@@ -175,7 +175,7 @@ impl Storage {
                 }
             }
             #[cfg(feature = "storage-gcs")]
-            Storage::Gcs { config } => {
+            OpenDalStorage::Gcs { config } => {
                 let operator = super::gcs_config_build(config, path)?;
                 let prefix = format!("gs://{}/", operator.info().name());
                 if path.starts_with(&prefix) {
@@ -188,7 +188,7 @@ impl Storage {
                 }
             }
             #[cfg(feature = "storage-oss")]
-            Storage::Oss { config } => {
+            OpenDalStorage::Oss { config } => {
                 let op = super::oss_config_build(config, path)?;
 
                 // Check prefix of oss path.
@@ -203,7 +203,7 @@ impl Storage {
                 }
             }
             #[cfg(feature = "storage-azdls")]
-            Storage::Azdls {
+            OpenDalStorage::Azdls {
                 configured_scheme,
                 config,
             } => super::azdls_create_operator(path, config, configured_scheme),

Reply via email to