jrmccluskey commented on code in PR #40140:
URL: https://github.com/apache/beam/pull/40140#discussion_r4064726592


##########
sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/IcebergIOSideInputTableCacheTest.java:
##########
@@ -521,4 +527,24 @@ public void testDisplayData() {
     assertEquals("600000", items.get("tableRefreshInterval"));
     assertEquals("3", items.get("pollingBuckets"));
   }
+
+  private static class EvolveSchemaMidExecutionDoFn extends DoFn<Row, Row> {
+    private final IcebergCatalogConfig catalogConfig;
+    private final String tableIdString;
+
+    EvolveSchemaMidExecutionDoFn(IcebergCatalogConfig catalogConfig, String 
tableIdString) {
+      this.catalogConfig = catalogConfig;
+      this.tableIdString = tableIdString;
+    }
+
+    @ProcessElement
+    public void processElement(@Element Row row, OutputReceiver<Row> out) {
+      Table table =
+          
catalogConfig.catalog().loadTable(IcebergUtils.parseTableIdentifier(tableIdString));
+      if (table.schema().findField("city") == null) {
+        table.updateSchema().addColumn("city", 
Types.StringType.get()).commit();
+      }

Review Comment:
   Okay I think that's updated correctly



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

Reply via email to