xxchan commented on code in PR #1135:
URL: https://github.com/apache/iceberg-rust/pull/1135#discussion_r2012394122


##########
crates/iceberg/src/inspect/snapshots.rs:
##########
@@ -38,43 +39,43 @@ impl<'a> SnapshotsTable<'a> {
         Self { table }
     }
 
-    /// Returns the schema of the snapshots table.
-    pub fn schema(&self) -> Schema {
-        Schema::new(vec![
-            Field::new(
-                "committed_at",
-                DataType::Timestamp(TimeUnit::Millisecond, 
Some("+00:00".into())),
-                false,
-            ),
-            Field::new("snapshot_id", DataType::Int64, false),
-            Field::new("parent_id", DataType::Int64, true),
-            Field::new("operation", DataType::Utf8, false),
-            Field::new("manifest_list", DataType::Utf8, false),
-            Field::new(
+    /// Returns the iceberg schema of the snapshots table.
+    pub fn schema(&self) -> crate::spec::Schema {
+        let fields = vec![
+            NestedField::required(1, "committed_at", 
Type::Primitive(PrimitiveType::Timestamp)),
+            NestedField::required(2, "snapshot_id", 
Type::Primitive(PrimitiveType::Long)),
+            NestedField::optional(3, "parent_id", 
Type::Primitive(PrimitiveType::Long)),
+            NestedField::required(4, "operation", 
Type::Primitive(PrimitiveType::String)),
+            NestedField::required(5, "manifest_list", 
Type::Primitive(PrimitiveType::String)),
+            NestedField::required(
+                6,

Review Comment:
   The schema is changed to be more aligned with Java 
https://github.com/apache/iceberg/blob/03ff41c189c7420992be0e4a4ddc63f005e2e0d5/core/src/main/java/org/apache/iceberg/SnapshotsTable.java#L30-L40
   
   Previously it aligns with Python.



-- 
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