CTTY commented on code in PR #2247:
URL: https://github.com/apache/iceberg-rust/pull/2247#discussion_r2991682637
##########
crates/iceberg/src/io/storage/mod.rs:
##########
@@ -133,10 +137,16 @@ pub trait StorageFactory: Debug + Send + Sync {
/// # Arguments
///
/// * `config` - The storage configuration containing scheme and properties
+ /// * `metadata` - Optional table metadata that storage backends can use
+ /// for table-level configuration (e.g., table properties).
///
/// # Returns
///
/// A `Result` containing an `Arc<dyn Storage>` on success, or an error
/// if the storage could not be created.
- fn build(&self, config: &StorageConfig) -> Result<Arc<dyn Storage>>;
+ fn build(
+ &self,
+ config: &StorageConfig,
+ metadata: Option<&TableMetadata>,
Review Comment:
> the motivation of adding this param is to improve the performance of
resolving storage to avoid checking url everytime
Yes
> For resolving storage, what should we do if it's None?
It's mostly up to the custom implementations. It should either fail or
return a resolving storage that resolves schemes before every IO
> Or should we ask if the resolving everytime is a true problem?
I'm also not sure about this when I think about it again. the perf
improvement can actually be trivial (resolving schemes vs IO operations is
usually microseconds vs milliseconds) cc @vustef do you have more context
maybe?
--
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]