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

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

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


##########
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) {

Review Comment:
   We can use Assume to test only partitioned tables, as it seems pointless to do so for non-partitioned tables. Alternatively, we can only add partition fields instead of deleting them, so that we can test them in any case.



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