ayushtkn commented on code in PR #4291:
URL: https://github.com/apache/hive/pull/4291#discussion_r1235136608


##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/TestHelpers.java:
##########
@@ -102,6 +102,24 @@ public static <T> T roundTripSerialize(T type) throws 
IOException, ClassNotFound
 //    );
 //  }
 
+  public static void assertSerializedMetadata(Table expected, Table actual) {
+    Assert.assertEquals("Name must match", expected.name(), actual.name());
+    Assert.assertEquals("Location must match", expected.location(), 
actual.location());
+    Assert.assertEquals("Props must match", expected.properties(), 
actual.properties());
+    Assert.assertEquals("Schema must match", expected.schema().asStruct(), 
actual.schema().asStruct());
+    Assert.assertEquals("Spec must match", expected.spec(), actual.spec());
+    Assert.assertEquals("Sort order must match", expected.sortOrder(), 
actual.sortOrder());
+  }
+
+  public static void assertSerializedAndLoadedMetadata(Table expected, Table 
actual) {
+    assertSerializedMetadata(expected, actual);
+    Assert.assertEquals("Specs must match", expected.specs(), actual.specs());
+    Assert.assertEquals("Sort orders must match", expected.sortOrders(), 
actual.sortOrders());
+    Assert.assertEquals("Current snapshot must match", 
expected.currentSnapshot(), actual.currentSnapshot());
+    Assert.assertEquals("Snapshots must match", expected.snapshots(), 
actual.snapshots());
+    Assert.assertEquals("History must match", expected.history(), 
actual.history());
+  }
+

Review Comment:
   this entire commit seems of no use, the usage doesn't lies in our code, we 
can drop this?



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