You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "chenjunjiedada (via GitHub)" <gi...@apache.org> on 2023/02/28 01:41:29 UTC

[GitHub] [iceberg] chenjunjiedada commented on a diff in pull request #6753: Flink: use projection when delete records in upsert mode

chenjunjiedada commented on code in PR #6753:
URL: https://github.com/apache/iceberg/pull/6753#discussion_r1119489627


##########
flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/sink/BaseDeltaTaskWriter.java:
##########
@@ -94,7 +94,11 @@ public void write(RowData row) throws IOException {
         writer.delete(row);
         break;
       case DELETE:
-        writer.delete(row);
+        if (upsert) {
+          writer.deleteKey(keyProjection.wrap(row));
+        } else {

Review Comment:
   @stevenzwu I don't think we should be consistent with other cases, the update case has to delete the key and write the row so it doesn't have an else clause, but here we only need to delete once.



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