MCPcopy Create free account
hub / github.com/apache/paimon-rust / table_exist

Method table_exist

crates/integrations/datafusion/src/catalog.rs:395–424  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

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,

Callers 1

temp_table_existMethod · 0.80

Calls 4

split_object_nameFunction · 0.85
is_registeredFunction · 0.85
block_on_with_runtimeFunction · 0.85
get_tableMethod · 0.45

Tested by

no test coverage detected