kbendick commented on code in PR #4716:
URL: https://github.com/apache/iceberg/pull/4716#discussion_r875241907


##########
core/src/test/java/org/apache/iceberg/TestMetadataUpdateParser.java:
##########
@@ -350,9 +485,51 @@ private static void assertEqualsAddSortOrder(
           UnboundSortOrder.UnboundSortField actualField = 
actual.sortOrder().fields().get(i);
           Assert.assertTrue("Fields of the sort order should be the same",
               expectedField.sourceId() == actualField.sourceId() &&
-              expectedField.nullOrder().equals(actualField.nullOrder()) &&
-              expectedField.direction().equals(actualField.direction()) &&
-              Objects.equals(expectedField.transformAsString(), 
actualField.transformAsString()));
+                  expectedField.nullOrder().equals(actualField.nullOrder()) &&
+                  expectedField.direction().equals(actualField.direction()) &&
+                  Objects.equals(expectedField.transformAsString(), 
actualField.transformAsString()));
         });
   }
+
+  private static void assertEqualsSetDefaultSortOrder(
+      MetadataUpdate.SetDefaultSortOrder expected, 
MetadataUpdate.SetDefaultSortOrder actual) {
+    Assert.assertEquals("Sort order id should be the same", 
expected.sortOrderId(), actual.sortOrderId());
+  }
+
+  // TODO - Come back to this when FileIO is injected. If this class extends 
TableTestBase, the validateSnapshot
+  //  methods can be reused. Also, this needs to handle V1 vs V2 for 
assertions. Or casting to BaseSnapshot,
+  //  BaseSnapshot::equals can be used.
+  private static void assertEqualsAddSnapshot(
+      MetadataUpdate.AddSnapshot expected, MetadataUpdate.AddSnapshot actual) {
+    Assert.fail("MetadataUpdate equality checking for AddSnapshot is not 
implemented yet");
+  }
+
+  private static void assertEqualsRemoveSnapshots(
+      MetadataUpdate.RemoveSnapshot expected, MetadataUpdate.RemoveSnapshot 
actual) {
+    Assert.assertEquals("Snapshots to remove should be the same", 
expected.snapshotId(), actual.snapshotId());
+  }
+
+  // See TODOs in MetadataUpdate.SetSnapshotRef.
+  private static void assertEqualsSetSnapshotRef(
+      MetadataUpdate.SetSnapshotRef expected, MetadataUpdate.SetSnapshotRef 
actual) {
+    Assert.fail("MetadataUpdate equality checking for SetSnapshotRef is not 
implemented yet");
+  }

Review Comment:
   See the notes in `MetadataUpdate.SetSnapshotRef` about possible things to 
update.
   
   Happy to remove this from this PR and place it elsewhere.



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