diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewritePositionDeleteFilesAction.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewritePositionDeleteFilesAction.java index 8e7081691894..2b1c7cfeada7 100644 --- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewritePositionDeleteFilesAction.java +++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewritePositionDeleteFilesAction.java @@ -82,6 +82,7 @@ import org.apache.spark.sql.internal.SQLConf; import org.apache.spark.sql.types.StructType; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.io.TempDir; @@ -202,8 +203,8 @@ public void testUnpartitioned() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -238,8 +239,8 @@ public void testRewriteAll() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -284,8 +285,8 @@ public void testRewriteFilter() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); withSQLConf( ImmutableMap.of(SQLConf.CASE_SENSITIVE().key(), "true"), @@ -334,8 +335,8 @@ public void testRewriteToSmallerTarget() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -379,8 +380,8 @@ public void testRemoveDanglingDeletes() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertThat(actualDeletes).as("No new position deletes").isEmpty(); + assertEquals("Rows", expectedRecords, actualRecords); + assertThat(actualDeletes).as("New position deletes").isEmpty(); } @TestTemplate @@ -432,8 +433,8 @@ public void testSomePartitionsDanglingDeletes() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -480,8 +481,8 @@ public void testRewriteFilterRemoveDangling() throws Exception { // Only non-compacted deletes remain List expectedDeletesFiltered = filterDeletes(expectedDeletes, ImmutableList.of(2), ImmutableList.of(3)); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletesFiltered, allDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletesFiltered, allDeletes); } @TestTemplate @@ -532,8 +533,8 @@ public void testPartitionEvolutionAdd() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -579,8 +580,8 @@ public void testPartitionEvolutionRemove() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } @TestTemplate @@ -629,7 +630,7 @@ public void testSchemaEvolution() throws Exception { checkSequenceNumbers(table, rewrittenDeleteFiles, newDeleteFiles); List actualRecords = records(table); - assertEquals("Rows must match", expectedRecords, actualRecords); + assertEquals("Rows", expectedRecords, actualRecords); } @TestTemplate @@ -724,8 +725,8 @@ public void testRewriteManyColumns() throws Exception { List actualRecords = records(table); List actualDeletes = deleteRecords(table); - assertEquals("Rows must match", expectedRecords, actualRecords); - assertEquals("Position deletes must match", expectedDeletes, actualDeletes); + assertEquals("Rows", expectedRecords, actualRecords); + assertEquals("Position deletes", expectedDeletes, actualDeletes); } private Table createTablePartitioned(int partitions, int files, int numRecords) { @@ -1054,48 +1055,48 @@ private void checkResult( List newDeletes, int expectedGroups) { assertThat(rewrittenDeletes.size()) - .as("Rewritten delete file count does not match") + .as("Rewritten delete file count") .isEqualTo(result.rewrittenDeleteFilesCount()); assertThat(newDeletes.size()) - .as("New delete file count does not match") + .as("New delete file count") .isEqualTo(result.addedDeleteFilesCount()); assertThat(size(rewrittenDeletes)) - .as("Rewritten delete byte count does not match") + .as("Rewritten delete byte count") .isEqualTo(result.rewrittenBytesCount()); assertThat(size(newDeletes)) - .as("New delete byte count does not match") + .as("New delete byte count") .isEqualTo(result.addedBytesCount()); assertThat(expectedGroups) - .as("Rewrite group count does not match") + .as("Rewrite group count") .isEqualTo(result.rewriteResults().size()); assertThat(rewrittenDeletes.size()) - .as("Rewritten delete file count in all groups to match") + .as("Rewritten delete file count in all groups") .isEqualTo( result.rewriteResults().stream() .mapToInt(FileGroupRewriteResult::rewrittenDeleteFilesCount) .sum()); assertThat(newDeletes.size()) - .as("Added delete file count in all groups to match") + .as("Added delete file count in all groups") .isEqualTo( result.rewriteResults().stream() .mapToInt(FileGroupRewriteResult::addedDeleteFilesCount) .sum()); assertThat(size(rewrittenDeletes)) - .as("Rewritten delete bytes in all groups to match") + .as("Rewritten delete bytes in all groups") .isEqualTo( result.rewriteResults().stream() .mapToLong(FileGroupRewriteResult::rewrittenBytesCount) .sum()); assertThat(size(newDeletes)) - .as("Added delete bytes in all groups to match") + .as("Added delete bytes in all groups") .isEqualTo( result.rewriteResults().stream() .mapToLong(FileGroupRewriteResult::addedBytesCount)