(&self)
| 324 | } |
| 325 | |
| 326 | fn table_names(&self) -> Vec<String> { |
| 327 | let catalog = Arc::clone(&self.catalog); |
| 328 | let database = self.database.clone(); |
| 329 | let mut names = block_on_with_runtime( |
| 330 | { |
| 331 | let db = database.clone(); |
| 332 | async move { |
| 333 | match catalog.list_tables(&db).await { |
| 334 | Ok(names) => names, |
| 335 | Err(e) => { |
| 336 | log::error!("failed to list tables in '{}': {e}", db); |
| 337 | vec![] |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | }, |
| 342 | "paimon catalog access thread panicked", |
| 343 | ); |
| 344 | |
| 345 | if let Some(temp) = &self.temp_provider { |
| 346 | names.extend(temp.table_names()); |
| 347 | } |
| 348 | |
| 349 | let mut seen = std::collections::HashSet::new(); |
| 350 | names.retain(|name| seen.insert(name.clone())); |
| 351 | |
| 352 | names |
| 353 | } |
| 354 | |
| 355 | async fn table(&self, name: &str) -> DFResult<Option<Arc<dyn TableProvider>>> { |
| 356 | if let Some(temp) = &self.temp_provider { |
nothing calls this directly
no test coverage detected