openinx commented on a change in pull request #4189:
URL: https://github.com/apache/iceberg/pull/4189#discussion_r811852248



##########
File path: 
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSink.java
##########
@@ -253,15 +258,24 @@ public void testHashDistributeMode() throws Exception {
         "write.format.default", format.name(),
         TableProperties.WRITE_DISTRIBUTION_MODE, 
DistributionMode.HASH.modeName()
     );
+
+    // Initialize a BoundedSource table to precisely control that those 9 rows 
will be emitted in only one checkpoint.
+    List<Row> dataSet = ImmutableList.of(
+        Row.of(1, "aaa"), Row.of(1, "bbb"), Row.of(1, "ccc"),
+        Row.of(2, "aaa"), Row.of(2, "bbb"), Row.of(2, "ccc"),
+        Row.of(3, "aaa"), Row.of(3, "bbb"), Row.of(3, "ccc"));
+    String dataId = 
BoundedTableFactory.registerDataSet(ImmutableList.of(dataSet));

Review comment:
       I think a single checkpoint is good enough to validate the 
PartitionKeySelector. More checkpoints will make the unit test more complex but 
validate the same thing in my mind. 
   
   Mocking more records as the testing data set looks good to me.




-- 
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]

Reply via email to