rdblue commented on a change in pull request #4316:
URL: https://github.com/apache/iceberg/pull/4316#discussion_r830200187



##########
File path: 
flink/v1.12/flink/src/main/java/org/apache/iceberg/flink/sink/BaseDeltaTaskWriter.java
##########
@@ -83,10 +92,21 @@ public void write(RowData row) throws IOException {
         if (upsert) {
           break;  // UPDATE_BEFORE is not necessary for UPDATE, we do nothing 
to prevent delete one row twice
         }
-        writer.delete(row);
+        if (deleteSchema != null) {
+          RowData wrap = RowDataProjection.create(schema, 
deleteSchema).wrap(row);
+          writer.deleteKey(wrap);
+        } else {
+          writer.delete(row);
+        }

Review comment:
       Why does this need to change? I think you just want to fix the `upsert` 
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: [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