tustvold commented on code in PR #4033:
URL: https://github.com/apache/arrow-datafusion/pull/4033#discussion_r1008935661


##########
datafusion/core/src/datasource/listing/table.rs:
##########
@@ -443,6 +443,20 @@ impl ListingTable {
         let store = ctx
             .runtime_env
             .object_store(&self.table_paths.get(0).unwrap())?;
+
+        let mut count = 0;
+        for table_path in &self.table_paths {
+            let stream = table_path.list_all_files(store.as_ref(), 
&self.options.file_extension);
+            let mut all_files = Box::pin(stream.fuse());
+            while let Some(res) = all_files.next().await {

Review Comment:
   Why not short-circuit on the first file?



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