335g commented on PR #1666: URL: https://github.com/apache/iceberg-rust/pull/1666#issuecomment-3341915460
@liurenjie1024 May I ask a question? Currently, to comply with `iceberg::CatalogBuilder`, [implementing `Default` is required](https://github.com/apache/iceberg-rust/blob/ba487fc1521f40c57f809d37f4f939e12fd41845/crates/iceberg/src/catalog/mod.rs#L114). Why exactly is `Default` necessary? I understand it's needed for the [`load` function](https://github.com/apache/iceberg-rust/blob/ba487fc1521f40c57f809d37f4f939e12fd41845/crates/catalog/loader/src/lib.rs#L68) in the `iceberg-loader-catalog` crate, but are there any other reasons? `SqlCatalog` requires `iceberg::FileIO`, but implementing `Default` to allow users to select the storage location proves challenging. Currently, I'm considering implementing it by passing `iceberg::FileIO` as an argument to the initializer. ```rust impl SqlCatalogBuilder { pub fn new(file_io: FileIO) -> Self { ... } } ``` If possible, I'd like to remove `Default` from the `iceberg::CatalogBuilder` definition. -- 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]
