adriangb commented on code in PR #19140:
URL: https://github.com/apache/datafusion/pull/19140#discussion_r2596185981


##########
datafusion/execution/src/cache/list_files_cache.rs:
##########
@@ -55,6 +75,19 @@ impl DefaultListFilesCache {
     pub fn new(memory_limit: usize, ttl: Option<Duration>) -> Self {
         Self {
             state: Mutex::new(DefaultListFilesCacheState::new(memory_limit, 
ttl)),
+            time_provider: Arc::new(SystemTimeProvider),
+        }
+    }
+
+    #[cfg(test)]
+    pub fn new_with_provider(

Review Comment:
   Could we also have `fn with_time_provider(mut self, provider: Arc<dyn 
TimeProvider>) -> Self` instead?



##########
datafusion/execution/src/cache/list_files_cache.rs:
##########
@@ -55,6 +75,19 @@ impl DefaultListFilesCache {
     pub fn new(memory_limit: usize, ttl: Option<Duration>) -> Self {
         Self {
             state: Mutex::new(DefaultListFilesCacheState::new(memory_limit, 
ttl)),
+            time_provider: Arc::new(SystemTimeProvider),
+        }
+    }
+
+    #[cfg(test)]
+    pub fn new_with_provider(

Review Comment:
   Does this need to be `pub`? It doesn't really matter since it won't be 
available in other crates anyway, just a nit.



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