(&self, name: &str)
| 393 | } |
| 394 | |
| 395 | fn table_exist(&self, name: &str) -> bool { |
| 396 | if let Some(temp) = &self.temp_provider { |
| 397 | if temp.table_exist(name) { |
| 398 | return true; |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | let (base, system_name) = system_tables::split_object_name(name); |
| 403 | if let Some(system_name) = system_name { |
| 404 | if !system_tables::is_registered(system_name) { |
| 405 | return false; |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | let catalog = Arc::clone(&self.catalog); |
| 410 | let identifier = Identifier::new(self.database.clone(), base.to_string()); |
| 411 | block_on_with_runtime( |
| 412 | async move { |
| 413 | match catalog.get_table(&identifier).await { |
| 414 | Ok(_) => true, |
| 415 | Err(paimon::Error::TableNotExist { .. }) => false, |
| 416 | Err(e) => { |
| 417 | log::error!("failed to check table '{}': {e}", identifier); |
| 418 | false |
| 419 | } |
| 420 | } |
| 421 | }, |
| 422 | "paimon catalog access thread panicked", |
| 423 | ) |
| 424 | } |
| 425 | |
| 426 | fn register_table( |
| 427 | &self, |
no test coverage detected