Skip to content

Commit

Permalink
Make partition overwrite assertion use exact rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadiusz Czajkowski authored and losipiuk committed Nov 8, 2021
1 parent f7c87f8 commit 3935f5f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,20 @@ protected void assertOverwritePartition(String testTable)
"('POLAND', 'Test Data', 25, 5), " +
"('CZECH', 'Test Data', 26, 5)",
testTable));
query(format("SELECT count(*) FROM %s WHERE regionkey = 5", testTable))
query(format("SELECT name, comment, nationkey, regionkey FROM %s WHERE regionkey = 5", testTable))
.assertThat()
.skippingTypesCheck()
.containsAll(resultBuilder(getSession())
.row(2L)
.row("POLAND", "Test Data", 25L, 5L)
.row("CZECH", "Test Data", 26L, 5L)
.build());

computeActual(format("INSERT INTO %s values('POLAND', 'Overwrite', 25, 5)", testTable));
query(format("SELECT count(*) FROM %s WHERE regionkey = 5", testTable))
query(format("SELECT name, comment, nationkey, regionkey FROM %s WHERE regionkey = 5", testTable))
.assertThat()
.skippingTypesCheck()
.containsAll(resultBuilder(getSession())
.row(1L)
.row("POLAND", "Overwrite", 25L, 5L)
.build());
computeActual(format("DROP TABLE %s", testTable));
}
Expand Down

0 comments on commit 3935f5f

Please sign in to comment.