nastra commented on code in PR #8560:
URL: https://github.com/apache/iceberg/pull/8560#discussion_r1326958522
##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java:
##########
@@ -223,6 +223,30 @@ public void testBinPackWithFilter() {
assertEquals("Rows must match", expectedRecords, actualRecords);
}
+ @Test
+ public void testBinPackWithFilterOnBucketExpression() {
+ Table table = createTablePartitioned(4, 2);
+
+ shouldHaveFiles(table, 8);
+ List<Object[]> expectedRecords = currentData();
+ long dataSizeBefore = testDataSize(table);
+
+ Result result =
+ basicRewrite(table)
+ .filter(Expressions.equal("c1", 1))
+ .filter(Expressions.equal(Expressions.bucket("c2", 2), 0))
+ .execute();
+
+ Assert.assertEquals("Action should rewrite 2 data files", 2,
result.rewrittenDataFilesCount());
Review Comment:
great that you already used AssertJ-style assertions in the other test file,
so I think we can do the same here then. No reason to use Junit4 style
assertions (as that will just add more overhead when migrating to JUnit5
--
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]