zeroshade commented on code in PR #108:
URL: https://github.com/apache/iceberg-go/pull/108#discussion_r1683516529


##########
table/metadata.go:
##########
@@ -156,6 +166,42 @@ type commonMetadata struct {
        Refs               map[string]SnapshotRef  `json:"refs"`
 }
 
+func (c *commonMetadata) Equals(other *commonMetadata) bool {
+       switch {
+       case c.LastPartitionID == nil && other.LastPartitionID != nil:
+               fallthrough
+       case c.LastPartitionID != nil && other.LastPartitionID == nil:
+               fallthrough
+       case c.CurrentSnapshotID == nil && other.CurrentSnapshotID != nil:
+               fallthrough
+       case c.CurrentSnapshotID != nil && other.CurrentSnapshotID == nil:
+               return false
+       }
+
+       switch {
+       case !sliceEqualHelper(c.SchemaList, other.SchemaList):
+               fallthrough
+       case !sliceEqualHelper(c.SnapshotList, other.SnapshotList):
+               fallthrough
+       case !sliceEqualHelper(c.Specs, other.Specs):
+               fallthrough
+       case !maps.Equal(c.Props, other.Props):

Review Comment:
   Sort order is handled on line 201 (`sliceEqualHelper(c.SortOrderList, 
other.SortOrderList)`)



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to