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

Method latest

crates/paimon/src/table/schema_manager.rs:114–120  ·  view source on GitHub ↗

Return the schema with the highest id, or `None` when no schema files exist under the schema directory. Mirrors Java [SchemaManager.latest()](https://github.com/apache/paimon/blob/release-1.3/paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java).

(&self)

Source from the content-addressed store, hash-verified

112 ///
113 /// Mirrors Java [SchemaManager.latest()](https://github.com/apache/paimon/blob/release-1.3/paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java).
114 pub async fn latest(&self) -> crate::Result<Option<Arc<TableSchema>>> {
115 let ids = self.list_all_ids().await?;
116 match ids.last() {
117 Some(&max_id) => Ok(Some(self.schema(max_id).await?)),
118 None => Ok(None),
119 }
120 }
121
122 /// Load a schema by ID. Returns cached version if available.
123 ///

Callers 3

create_branchMethod · 0.80

Calls 2

list_all_idsMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected