We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8144e19 commit 39e9650Copy full SHA for 39e9650
datafusion/datasource/src/url.rs
@@ -412,10 +412,11 @@ async fn list_with_cache<'b>(
412
} else {
413
// Cache miss - always list and cache the full table
414
// This ensures we have complete data for future prefix queries
415
- let vec = store
+ let mut vec = store
416
.list(Some(table_base_path))
417
.try_collect::<Vec<ObjectMeta>>()
418
.await?;
419
+ vec.shrink_to_fit(); // Right-size before caching
420
let cached: CachedFileList = vec.into();
421
let result = cached.files_matching_prefix(&filter_prefix);
422
cache.put(&table_scoped_base_path, cached);
0 commit comments