kbendick commented on code in PR #4716:
URL: https://github.com/apache/iceberg/pull/4716#discussion_r877526180
##########
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");
+ }
Review Comment:
I think that's sufficient.
What about the snapshots schema id, operation, and the timestamp? Possibly
overkill as the three you mentioned (especially the combination of snapshot ID
and manifest list location) could arguably be considered sufficient.
--
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]