mxm commented on code in PR #18583:
URL: https://github.com/apache/iceberg/pull/18583#discussion_r4314772412


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -101,6 +102,13 @@ private void findOrCreateTable(
   }
 
   private void findOrCreateBranch(TableIdentifier identifier, String branch) {
+    if (SnapshotRef.MAIN_BRANCH.equals(branch)) {
+      // The main branch is created by the first commit to the table, so there 
is nothing to
+      // create. Creating it here would commit an empty snapshot to a table 
that has none, and
+      // every writer subtask that gets here before the first data commit 
would add another.
+      return;
+    }

Review Comment:
   Does this only work for the main branch and not for other branches?



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