tustvold commented on code in PR #3796:
URL: https://github.com/apache/arrow-rs/pull/3796#discussion_r1124300556


##########
object_store/src/memory.rs:
##########
@@ -150,7 +155,7 @@ impl ObjectStore for InMemory {
         Ok(ObjectMeta {
             location: location.clone(),
             last_modified,

Review Comment:
   I think this should return the timestamp from the entry?



##########
object_store/src/memory.rs:
##########
@@ -225,7 +230,7 @@ impl ObjectStore for InMemory {
                 let object = ObjectMeta {
                     location: k.clone(),
                     last_modified,

Review Comment:
   Ditto here



##########
object_store/src/memory.rs:
##########
@@ -33,6 +33,8 @@ use std::sync::Arc;
 use std::task::Poll;
 use tokio::io::AsyncWrite;
 
+type StorageType = Arc<RwLock<BTreeMap<Path, (Bytes, DateTime<Utc>)>>>;

Review Comment:
   ```suggestion
   type Entry = (Bytes, DateTime<Utc>);
   type StorageType = Arc<RwLock<BTreeMap<Path, Entry>>>;
   ```



##########
object_store/src/memory.rs:
##########
@@ -273,22 +278,23 @@ impl InMemory {
         }
     }
 
-    async fn get_bytes(&self, location: &Path) -> Result<Bytes> {
+    async fn get_bytes(&self, location: &Path) -> Result<(Bytes, 
DateTime<Utc>)> {

Review Comment:
   ```suggestion
       async fn entry(&self, location: &Path) -> Result<(Bytes, DateTime<Utc>)> 
{
   ```



##########
object_store/src/memory.rs:
##########
@@ -181,7 +186,7 @@ impl ObjectStore for InMemory {
                 Ok(ObjectMeta {
                     location: key.clone(),
                     last_modified,

Review Comment:
   This should be the value from the entry?



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