nastra commented on code in PR #6801:
URL: https://github.com/apache/iceberg/pull/6801#discussion_r1106835257
##########
spark/v3.3/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewriteDataFilesProcedure.java:
##########
@@ -230,8 +266,14 @@ public void
testRewriteDataFilesWithFilterOnPartitionTable() {
assertEquals(
"Action should rewrite 5 data files from single matching partition"
+ "(containing c2 = bar) and add 1 data files",
- ImmutableList.of(row(5, 1)),
- output);
+ row(5, 1),
+ Arrays.copyOf(output.get(0), 2));
+ // verify rewritten bytes separately
+ assertThat(output.get(0)).hasSize(3);
+ assertThat(output.get(0)[2])
+ .asInstanceOf(InstanceOfAssertFactories.LONG)
+ .isGreaterThan(0L)
+ .isLessThan(dataSizeBefore);
Review Comment:
you're right, we can actually check the snapshot summary. I've adjusted this
test to do that.
Regarding AssertJ assertions: It just provides much better context overall
when an assertion fails and also allows checking for things in a more fluent
way.
--
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]