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)
| 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 | /// |
no test coverage detected