You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ConeyLiu (via GitHub)" <gi...@apache.org> on 2023/03/27 07:27:57 UTC

[GitHub] [iceberg] ConeyLiu commented on a diff in pull request #7171: Flink: IcebergFilesCommitter should use same PartitionSpec as the IcebergStreamWriter

ConeyLiu commented on code in PR #7171:
URL: https://github.com/apache/iceberg/pull/7171#discussion_r1148894713


##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java:
##########
@@ -390,4 +393,45 @@ public void testOverrideWriteConfigWithUnknownFileFormat() {
           return null;
         });
   }
+
+  @Test
+  public void testPartitionEvolution() throws Exception {
+    List<List<Row>> rows =
+        IntStream.range(0, 10)
+            .mapToObj(i -> createRows(String.valueOf(i)))
+            .collect(Collectors.toList());
+
+    DataStream<Row> dataStream = env.addSource(new BoundedTestSource<>(rows), ROW_TYPE_INFO);
+
+    FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
+        .table(table)
+        .tableLoader(tableLoader)
+        .writeParallelism(parallelism)
+        .append();
+
+    Thread thread = null;
+    if (partitioned) {
+      thread =
+          new Thread(
+              () -> {
+                try {
+                  Thread.sleep(120);

Review Comment:
   `TestIcebergFilesCommitter ` only tests `IcebergFilesCommitter` self, the new UT aims to simulate the partition evolution while flink job running.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org