suremarc commented on code in PR #9655:
URL: https://github.com/apache/arrow-datafusion/pull/9655#discussion_r1529230667


##########
datafusion/core/src/datasource/listing/helpers.rs:
##########
@@ -168,24 +178,154 @@ struct Partition {
     files: Option<Vec<ObjectMeta>>,
 }
 
+#[derive(Debug, Default)]
+struct ObjectMetaLister {
+    objects: Arc<Vec<ObjectMeta>>,

Review Comment:
   Personally I would I recommend a trie for this use case, as 
`list_with_delimiter` called individually on _every single partition_, which 
means this code is going to perform O(N^2) in the worst case. I used 
[`sequence_trie`](https://docs.rs/sequence_trie/latest/sequence_trie/) for this 
in my own object store cache implementation. 
   
   IMO it would be ideal if the `ListFilesCache` itself returned a trie instead 
of a `Vec` -- then no conversion will need to happen at all.



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