| 224 | } |
| 225 | |
| 226 | fn list_entries(&self) -> HashMap<TableScopedPath, FileStatisticsCacheEntry> { |
| 227 | let mut entries = HashMap::<TableScopedPath, FileStatisticsCacheEntry>::new(); |
| 228 | let mut ctx = DFHeapSizeCtx::default(); |
| 229 | for entry in self.state.lock().unwrap().lru_queue.list_entries() { |
| 230 | let path = entry.0.clone(); |
| 231 | let cached = entry.1; |
| 232 | entries.insert( |
| 233 | path, |
| 234 | FileStatisticsCacheEntry { |
| 235 | object_meta: cached.meta.clone(), |
| 236 | num_rows: cached.statistics.num_rows, |
| 237 | num_columns: cached.statistics.column_statistics.len(), |
| 238 | table_size_bytes: cached.statistics.total_byte_size, |
| 239 | statistics_size_bytes: cached.statistics.heap_size(&mut ctx), |
| 240 | has_ordering: cached.ordering.is_some(), |
| 241 | }, |
| 242 | ); |
| 243 | } |
| 244 | |
| 245 | entries |
| 246 | } |
| 247 | |
| 248 | fn drop_table_entries( |
| 249 | &self, |