JTidbury2 commented on code in PR #18675:
URL: https://github.com/apache/iceberg/pull/18675#discussion_r4695838364


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/WriteTarget.java:
##########
@@ -75,6 +75,15 @@ Set<Integer> equalityFields() {
     return equalityFields;
   }
 
+  /**
+   * Returns the target with its schema ID removed. Writers whose targets 
differ only in schema ID
+   * write the same table, branch and spec with the same equality fields, so 
rows they write within
+   * one checkpoint can be retired by each other's position deletes.
+   */
+  WriteTarget withoutSchemaId() {
+    return new WriteTarget(tableName, branch, null, specId, upsertMode, 
equalityFields);

Review Comment:
   Upsert Mode: agreed, fixed. Writers now share a tracker regardless of upsert 
mode, as long as table, branch, spec and equality fields match. 
   
   Partition spec: Happy to address this in a follow-up, but I think it's a 
sizeable change to core. `BaseTaskWriter` would need to record each inserted 
row's spec and partition and write the position delete or DV under those rather 
than the writer's own, and the v2 position-delete writer is currently bound to 
a single spec and partition. I'd rather not grow this PR by that much.



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