Skip to content

Commit

Permalink
Spark 3.5: Fix assertion mismatch in PartitionedWritesTestBase/TestRe…
Browse files Browse the repository at this point in the history
…writePositionDeleteFilesAction (#11748)
  • Loading branch information
wzx140 authored Dec 15, 2024
1 parent c2fd77a commit bcf7b63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public void testRewriteFilter() throws Exception {
.execute();

List<DeleteFile> newDeleteFiles = except(deleteFiles(table), deleteFiles);
assertThat(newDeleteFiles).as("Should have 4 delete files").hasSize(2);
assertThat(newDeleteFiles).as("Delete files").hasSize(2);

List<DeleteFile> expectedRewrittenFiles =
filterFiles(table, deleteFiles, ImmutableList.of(1), ImmutableList.of(2));
Expand Down Expand Up @@ -469,7 +469,7 @@ public void testRewriteFilterRemoveDangling() throws Exception {
.execute();

List<DeleteFile> newDeleteFiles = except(deleteFiles(table), deleteFiles);
assertThat(newDeleteFiles).as("Should have 2 new delete files").hasSize(0);
assertThat(newDeleteFiles).as("New delete files").hasSize(0);

List<DeleteFile> expectedRewrittenFiles =
filterFiles(table, deleteFiles, ImmutableList.of(0), ImmutableList.of(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void removeTables() {
@TestTemplate
public void testInsertAppend() {
assertThat(scalarSql("SELECT count(*) FROM %s", selectTarget()))
.as("Should have 5 rows after insert")
.as("Rows before insert")
.isEqualTo(3L);

sql("INSERT INTO %s VALUES (4, 'd'), (5, 'e')", commitTarget());
Expand All @@ -74,7 +74,7 @@ public void testInsertAppend() {
@TestTemplate
public void testInsertOverwrite() {
assertThat(scalarSql("SELECT count(*) FROM %s", selectTarget()))
.as("Should have 5 rows after insert")
.as("Rows before overwrite")
.isEqualTo(3L);

// 4 and 5 replace 3 in the partition (id - (id % 3)) = 3
Expand Down

0 comments on commit bcf7b63

Please sign in to comment.