kbendick commented on a change in pull request #4316:
URL: https://github.com/apache/iceberg/pull/4316#discussion_r830366924
##########
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:
Addtionally, in the `upsert` case, data doesn't come through as
`UPDATE_BEFORE`. Though this might be needed to keep CDC data in check.
We've been workin on the PR in my fork but I'll run some tests.
--
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]