blackmwk commented on code in PR #2207: URL: https://github.com/apache/iceberg-rust/pull/2207#discussion_r2887010542
########## crates/storage/opendal/src/lib.rs: ########## @@ -15,60 +15,65 @@ // specific language governing permissions and limitations // under the License. -//! OpenDAL-based storage implementation. +//! OpenDAL-based storage implementation for Apache Iceberg. +//! +//! This crate provides [`OpenDalStorage`] and [`OpenDalStorageFactory`], +//! which implement the [`Storage`](iceberg::io::Storage) and +//! [`StorageFactory`](iceberg::io::StorageFactory) traits from the `iceberg` crate +//! using [OpenDAL](https://opendal.apache.org/) as the backend. -use std::ops::Range; -use std::sync::Arc; - -use async_trait::async_trait; -#[cfg(feature = "storage-azdls")] -use azdls::AzureStorageScheme; -use bytes::Bytes; -use opendal::Operator; -use opendal::layers::RetryLayer; -#[cfg(feature = "storage-azdls")] -use opendal::services::AzdlsConfig; -#[cfg(feature = "storage-gcs")] -use opendal::services::GcsConfig; -#[cfg(feature = "storage-oss")] -use opendal::services::OssConfig; -#[cfg(feature = "storage-s3")] -use opendal::services::S3Config; -#[cfg(feature = "storage-s3")] -pub use s3::CustomAwsCredentialLoader; -use serde::{Deserialize, Serialize}; +mod utils; -use crate::io::{ - FileMetadata, FileRead, FileWrite, InputFile, OutputFile, Storage, StorageConfig, - StorageFactory, -}; -use crate::{Error, ErrorKind, Result}; - -#[cfg(feature = "storage-azdls")] +#[cfg(feature = "opendal-azdls")] mod azdls; -#[cfg(feature = "storage-fs")] +#[cfg(feature = "opendal-fs")] mod fs; -#[cfg(feature = "storage-gcs")] +#[cfg(feature = "opendal-gcs")] mod gcs; -#[cfg(feature = "storage-memory")] +#[cfg(feature = "opendal-memory")] mod memory; -#[cfg(feature = "storage-oss")] +#[cfg(feature = "opendal-oss")] mod oss; -#[cfg(feature = "storage-s3")] +#[cfg(feature = "opendal-s3")] mod s3; -#[cfg(feature = "storage-azdls")] +use std::sync::Arc; + +use async_trait::async_trait; +#[cfg(feature = "opendal-azdls")] Review Comment: nit: How about we put `mod azdls;` and `use azdls::*` together? It seems eaiser to maintain. ########## crates/storage/opendal/Cargo.toml: ########## Review Comment: We need to change publish workflow to add the new crate. -- 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]
