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

Method table_names

crates/integrations/datafusion/src/catalog.rs:326–353  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

block_on_with_runtimeFunction · 0.85
insertMethod · 0.80
list_tablesMethod · 0.45

Tested by

no test coverage detected