CTTY commented on issue #2065:
URL: https://github.com/apache/iceberg-rust/issues/2065#issuecomment-3850441553

   Found some issues when designing the API:
   
   1. delete_iter would be tricky to put in a trait due to object safety. `fn 
delete_stream(
           &self,
           locations: BoxStream<'static, Result<String>>,
       )` seems like a better choice
   
   2. How should we handle error? 
   In object_store, it returns a stream of results:
   ```
       fn delete_stream(
           &self,
           locations: BoxStream<'static, Result<Path>>,
       ) -> BoxStream<'static, Result<Path>>;
   ```
   While in opendal, it returns one result:
   ```
   pub async fn delete_stream<S, D>(&mut self, stream: S) -> Result<()>
   ```
   Looking at [S3 sdk 
documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/s3_example_s3_DeleteObjects_section.html),
 the semantics of `DeleteObjects` is closer to opendal
   
   Currently in my PR I'm going with `async fn delete_stream(&self, paths: 
BoxStream<'static, String>) -> Result<()>;`


-- 
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]

Reply via email to