carols10cents commented on PR #4876:
URL: https://github.com/apache/arrow-rs/pull/4876#issuecomment-1747377693

   Hm. I'm trying to put this into use in IOx and running into a bit of a 
problem... ideally, we'd like to not have to change much about the rest of the 
codebase that uses `Arc<object_store::DynObjectStore>` pretty much everywhere, 
so Dom and I were thinking of defining a new trait for presigned URLs (that 
would be a supertrait of `object_store::ObjectStore` and the bulk import could 
say it needed that, `AmazonS3` could implement it, and the other object store 
types could implement the new trait but return an error (at some level TBD).
   
   The problem with that I'm running into is that we're not actually using 
`AmazonS3`, we're using a `LimitStore` adapting an `AmazonS3`, and I can't 
`impl<T: TheNewTrait> TheNewTrait for `LimitStore<T>`  because `LimitStore` (or 
for that matter `ThrottledStore`) doesn't expose access to the inner `T`.
   
   The solutions I'm seeing to this need to be done in `object_store`, I think:
   
   - Add `pub fn inner(&self) -> &T` to `LimitStore` and `ThrottledStore` to 
enable implementing traits that delegate to these adapters' inner object 
stores, which could enable other object store extensions in the future
   - Define this new trait I tried to write within `object_store` itself, and 
have all the implementers other than `AmazonS3` return an error saying it's not 
supported
   - ??? Something else I'm not seeing?
   
   I'm going to try going down these paths to see if I run into different 
issues, but I'd love thoughts on the best way to solve this from the 
`object_store` perspective!


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

Reply via email to