rdblue commented on code in PR #5450:
URL: https://github.com/apache/iceberg/pull/5450#discussion_r948430978
##########
core/src/test/java/org/apache/iceberg/TestMetadataUpdateParser.java:
##########
@@ -738,6 +740,40 @@ public void testSetLocationToJson() {
"Remove properties should serialize to the correct JSON value",
expected, actual);
}
+ /** SetStatistics */
+ @Test
+ public void testSetStatistics() {
+ String json =
+
"{\"action\":\"set-statistics\",\"snapshot-id\":42,\"path\":\"s3://bucket/warehouse/stats.puffin\","
+ +
"\"file-size-in-bytes\":124,\"file-footer-size-in-bytes\":27,\"blob-metadata\":[{\"type\":\"boring-type\",\"source-snapshot-id\":42,\"source-snapshot-sequence-number\":2,\"fields\":[1],\"properties\":{\"prop-key\":\"prop-value\"}}]}";
+ MetadataUpdate expected =
+ new MetadataUpdate.SetStatistics(
+ 42,
+ new GenericStatisticsFile(
+ 42,
+ "s3://bucket/warehouse/stats.puffin",
+ 124,
+ 27,
+ ImmutableList.of(
+ new GenericBlobMetadata(
+ "boring-type",
+ 42,
+ 2,
+ ImmutableList.of(1),
+ ImmutableMap.of("prop-key", "prop-value")))));
+ assertEquals(
+ MetadataUpdateParser.SET_STATISTICS, expected,
MetadataUpdateParser.fromJson(json));
+ }
+
+ /** RemoveStatistics */
Review Comment:
Can you remove these comments? This context is clear from the test name so
these aren't needed.
--
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]