stevenzwu commented on a change in pull request #4117:
URL: https://github.com/apache/iceberg/pull/4117#discussion_r808718115
##########
File path:
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSink.java
##########
@@ -277,15 +277,15 @@ public void testHashDistributeMode() throws Exception {
));
// Sometimes we will have more than one checkpoint if we pass the auto
checkpoint interval,
- // thus producing multiple snapshots. Here we assert that each snapshot
has only 1 file per partition.
+ // thus producing multiple snapshots. Here we assert that each snapshot
has no more than 1 file per partition.
Map<Long, List<DataFile>> snapshotToDataFiles =
SimpleDataUtil.snapshotToDataFiles(table);
for (List<DataFile> dataFiles : snapshotToDataFiles.values()) {
- Assert.assertEquals("There should be 1 data file in partition 'aaa'",
1,
- SimpleDataUtil.matchingPartitions(dataFiles, table.spec(),
ImmutableMap.of("data", "aaa")).size());
- Assert.assertEquals("There should be 1 data file in partition 'bbb'",
1,
- SimpleDataUtil.matchingPartitions(dataFiles, table.spec(),
ImmutableMap.of("data", "bbb")).size());
- Assert.assertEquals("There should be 1 data file in partition 'ccc'",
1,
- SimpleDataUtil.matchingPartitions(dataFiles, table.spec(),
ImmutableMap.of("data", "ccc")).size());
+ Assert.assertTrue("There should be no more than 1 data file in
partition 'aaa'",
+ SimpleDataUtil.matchingPartitions(dataFiles, table.spec(),
ImmutableMap.of("data", "aaa")).size() < 2);
Review comment:
It is unclear to me how this change of assertion is related the
potential cause you described where 2 checkpoint cycles can be committed in one
shot. Then we can get 2 files for one partition. why would we get 0 file for a
partition?
--
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]