MCPcopy Create free account
hub / github.com/apache/datafusion / files_matching_prefix

Method files_matching_prefix

datafusion/execution/src/cache/cache_manager.rs:176–181  ·  view source on GitHub ↗

Returns files matching the given prefix. When prefix is `None`, returns a clone of the `Arc` (no data copy). When filtering is needed, returns a new `Arc` with filtered results (clones each matching [`ObjectMeta`]).

(&self, prefix: &Option<Path>)

Source from the content-addressed store, hash-verified

174 /// When prefix is `None`, returns a clone of the `Arc` (no data copy).
175 /// When filtering is needed, returns a new `Arc` with filtered results (clones each matching [`ObjectMeta`]).
176 pub fn files_matching_prefix(&self, prefix: &Option<Path>) -> Arc<Vec<ObjectMeta>> {
177 match prefix {
178 None => Arc::clone(&self.files),
179 Some(p) => Arc::new(self.filter_by_prefix(&Some(p.clone()))),
180 }
181 }
182}
183
184impl Deref for CachedFileList {

Callers 4

list_with_cacheFunction · 0.80
test_prefix_filteringFunction · 0.80
test_nested_partitionsFunction · 0.80

Calls 3

newFunction · 0.85
filter_by_prefixMethod · 0.80
cloneMethod · 0.45

Tested by 3

test_prefix_filteringFunction · 0.64
test_nested_partitionsFunction · 0.64