CTTY commented on code in PR #2332:
URL: https://github.com/apache/iceberg-rust/pull/2332#discussion_r3089172516
##########
crates/storage/opendal/src/resolving.rs:
##########
@@ -104,7 +104,20 @@ fn build_storage_for_scheme(
config: Arc::new(config),
})
}
- #[cfg(feature = "opendal-oss")]
+ // OSS is S3-API-compatible; route through S3 so `s3.*` props
+ // work for OSS-backed tables (mirrors pyiceberg/Java S3FileIO).
+ #[cfg(feature = "opendal-s3")]
+ Scheme::Oss => {
+ let config = crate::s3::s3_config_parse(props.clone())?;
+ Ok(OpenDalStorage::S3 {
+ configured_scheme: scheme.to_string(),
+ config: Arc::new(config),
+ customized_credential_load: customized_credential_load.clone(),
+ })
+ }
+ // Fallback: builds without `opendal-s3` but with `opendal-oss`
+ // still use the native OSS service (which consumes `oss.*` keys).
+ #[cfg(all(feature = "opendal-oss", not(feature = "opendal-s3")))]
Review Comment:
I'm not very familiar with OSS storage so not sure about it: Is the fallback
actually necessary? I'm thinking if using OSS exactly like S3 is the common
case, maybe we can just use OpenDalS3Storage directly?
##########
crates/storage/opendal/src/resolving.rs:
##########
@@ -104,7 +104,20 @@ fn build_storage_for_scheme(
config: Arc::new(config),
})
}
- #[cfg(feature = "opendal-oss")]
+ // OSS is S3-API-compatible; route through S3 so `s3.*` props
+ // work for OSS-backed tables (mirrors pyiceberg/Java S3FileIO).
+ #[cfg(feature = "opendal-s3")]
Review Comment:
```suggestion
#[cfg(all(feature = "opendal-oss", feature = "opendal-s3"))]
```
Only having s3 feature flag will introduce oss related code to non-oss users
--
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]