thinkharderdev commented on issue #4754:
URL: https://github.com/apache/arrow-rs/issues/4754#issuecomment-1772957067

   > Yeah, GCS doesn't even have a notion of tags, only metadata
   
   Right, but it may not really be an issue as long as the semantics are 
internally consistent within a provider. When it's unclear where to put the 
metadata (like in the case of AWS) that should be manageable through 
configuration. 
   
   It's annoying that semantics are different between providers but that is 
what it is. I think something like:
   
   ```
   pub struct PutOptions {
       pub metadata: HashMap<String, String>
   }
   
   pub struct ObjectMeta {
       /// The full path to the object
       pub location: Path,
       /// The last modified time
       pub last_modified: DateTime<Utc>,
       /// The size in bytes of the object
       pub size: usize,
       /// The unique identifier for the object
       ///
       /// <https://datatracker.ietf.org/doc/html/rfc9110#name-etag>
       pub e_tag: Option<String>,
       /// A version indicator for this object
       pub version: Option<String>,
       /// Key/Value metadata for this object
       pub metadata: HashMap<String,String>
   }
   
   trait ObjectStore {
   
     async fn put_opt(&self, location: &Path, bytes: Bytes, options: 
PutOptions) -> Result<PutResult>;
   
     fn async get_metadata(&self, location: &Path) -> 
Result<HashMap<String,String>>;
   }
   
   ```
   
   where `ObjectStore::get_metadata` can be used to fetch metadata which isn't 
included in regular `Get` or `List` requests (like with S3). 


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