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

Method rename_table

crates/paimon/src/api/rest_api.rs:356–367  ·  view source on GitHub ↗

Rename a table.

(&self, source: &Identifier, destination: &Identifier)

Source from the content-addressed store, hash-verified

354
355 /// Rename a table.
356 pub async fn rename_table(&self, source: &Identifier, destination: &Identifier) -> Result<()> {
357 validate_non_empty_multi(&[
358 (source.database(), "source database name"),
359 (source.object(), "source table name"),
360 (destination.database(), "destination database name"),
361 (destination.object(), "destination table name"),
362 ])?;
363 let path = self.resource_paths.rename_table();
364 let request = RenameTableRequest::new(source.clone(), destination.clone());
365 let _resp: serde_json::Value = self.client.post(&path, &request).await?;
366 Ok(())
367 }
368
369 /// Drop a table.
370 pub async fn drop_table(&self, identifier: &Identifier) -> Result<()> {

Callers 1

mainFunction · 0.45

Calls 4

validate_non_empty_multiFunction · 0.85
objectMethod · 0.80
postMethod · 0.80
databaseMethod · 0.45

Tested by

no test coverage detected