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

Method get_table

crates/paimon/src/catalog/filesystem.rs:281–304  ·  view source on GitHub ↗
(&self, identifier: &Identifier)

Source from the content-addressed store, hash-verified

279 }
280
281 async fn get_table(&self, identifier: &Identifier) -> Result<Table> {
282 let table_path = self.table_path(identifier);
283
284 if !self.table_exists(identifier).await? {
285 return Err(Error::TableNotExist {
286 full_name: identifier.full_name(),
287 });
288 }
289
290 let schema = self
291 .load_latest_table_schema(&table_path)
292 .await?
293 .ok_or_else(|| Error::TableNotExist {
294 full_name: identifier.full_name(),
295 })?;
296
297 Ok(Table::new(
298 self.file_io.clone(),
299 identifier.clone(),
300 table_path,
301 schema,
302 None,
303 ))
304 }
305
306 async fn list_tables(&self, database_name: &str) -> Result<Vec<String>> {
307 let path = self.database_path(database_name);

Callers 2

list_partitionsMethod · 0.45
test_table_operationsFunction · 0.45

Calls 4

table_pathMethod · 0.80
table_existsMethod · 0.80
full_nameMethod · 0.80

Tested by 1

test_table_operationsFunction · 0.36