dramaticlly commented on code in PR #8560:
URL: https://github.com/apache/iceberg/pull/8560#discussion_r1327537402
##########
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:
thank you @nastra , update to use assertJ and combined both assertEquals
into one assertion.
--
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]