liurenjie1024 commented on code in PR #89:
URL: https://github.com/apache/iceberg-rust/pull/89#discussion_r1378335610


##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -109,50 +110,139 @@ pub struct TableMetadata {
 }
 
 impl TableMetadata {
+    /// Returns format version of this metadata.
+    #[inline]
+    pub fn format_version(&self) -> FormatVersion {
+        self.format_version.clone()
+    }
+
+    /// Returns uuid of current table.
+    #[inline]
+    pub fn uuid(&self) -> &Uuid {
+        &self.table_uuid
+    }
+
+    /// Returns table location.
+    #[inline]
+    pub fn location(&self) -> &str {
+        self.location.as_str()
+    }
+
+    /// Returns last sequence number.
+    #[inline]
+    pub fn last_sequence_number(&self) -> i64 {
+        self.last_sequence_number
+    }
+
+    /// Returns last updated time.
+    #[inline]
+    pub fn last_updated_ms(&self) -> i64 {
+        self.last_updated_ms
+    }
+
+    /// Returns schemas
+    #[inline]
+    pub fn schemas(&self) -> impl Iterator<Item = &SchemaRef> {
+        self.schemas.values()
+    }
+
+    /// Lookup schema by id.
+    #[inline]
+    pub fn schema_by_id(&self, schema_id: i32) -> Option<&SchemaRef> {

Review Comment:
   `Arc` is not as cheap as `Rc`, I still prefer to use `&Arc` to avoid 
unnecessary overhead, and leave it to user to do it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to