linhr commented on issue #1314:
URL: https://github.com/apache/iceberg-rust/issues/1314#issuecomment-2903122746
> That's the problem, we are defining a richer interface that's not used by
iceberg, then it would be confusing for people who want to define their own
FileIO implementation, which part should they implement, and which part they
should not? Also confusing for user, they are supposed to be careful when using
FileIO since some implementation may not implement some methods.
This seems a good point. I feel an explicit interface conveys the intent if
Iceberg only uses a small set of file/object operations.
> Here is an example:
I'm not sure if I understand this though, especially the difference between
`FileIO` and `DynFileIO`. Also it seems `InputFile` etc. are trait now, and I'm
worried that it may add burden to the implementer.
Following my earlier thinking around making `Storage` a trait, would the
following be a viable option?
```rust
pub struct FileIO {
inner: Arc<dyn Storage>,
}
pub(crate) trait Storage {
}
pub struct InputFile {
inner: Arc<dyn Storage>,
path: String,
}
```
--
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]