slfan1989 commented on code in PR #10189:
URL: https://github.com/apache/ozone/pull/10189#discussion_r3192722109
##########
hadoop-ozone/iceberg/src/test/java/org/apache/hadoop/ozone/iceberg/TestRewriteTablePathOzoneAction.java:
##########
@@ -188,6 +191,51 @@ void tablePathRewriteForStartAndEndVersionProvided()
throws Exception {
assertAllInternalPathsRewritten(csvPairs, targetPrefix);
}
+ @Test
+ void statsFileCopyPlanReturnsEmptySetForEmptyStats() {
+ Set<Pair<String, String>> copyPlan =
+ RewriteTablePathOzoneUtils.statsFileCopyPlan(List.of(), List.of());
+
+ assertTrue(copyPlan.isEmpty());
+ }
+
+ @Test
+ void statsFileCopyPlanRejectsMismatchedStatsCount() {
+ IllegalArgumentException exception =
assertThrows(IllegalArgumentException.class,
+ () -> RewriteTablePathOzoneUtils.statsFileCopyPlan(
+ List.of(statisticsFile("before-1.puffin", 100)),
+ List.of()));
+
+ assertEquals("Before and after path rewrite, statistic files count should
be same",
+ exception.getMessage());
+ }
Review Comment:
Thanks for the review! Fixed. The test data now uses `.stats` for statistics
files, which better matches the real file naming and avoids implying deletion
vector files.
--
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]