bharath-techie commented on code in PR #18971:
URL: https://github.com/apache/datafusion/pull/18971#discussion_r2569352707


##########
datafusion/core/src/datasource/listing_table_factory.rs:
##########
@@ -190,6 +190,12 @@ impl TableProviderFactory for ListingTableFactory {
             .with_definition(cmd.definition.clone())
             .with_constraints(cmd.constraints.clone())
             .with_column_defaults(cmd.column_defaults.clone());
+
+        // Pre-warm statistics cache if collect_statistics is enabled
+        if session_state.config().collect_statistics() {
+            let _ = table.list_files_for_scan(state, &[], None).await?;

Review Comment:
   1. Is it okay to reuse this method to pre-warm as we do couple more things 
post collecting the statistics ?
   2. Also is no limit fine ? as list_file_statistics_cache doesn't seem to 
have any size limit unlike metadata cache ? 
   
   cc: @alamb 



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