gustavodemorais commented on code in PR #30173:
URL: https://github.com/apache/flink/pull/30173#discussion_r4782343260
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/ChangelogNormalizeRequirementResolver.java:
##########
@@ -87,10 +83,18 @@ public static boolean isRequired(
return true;
}
+ // ChangelogNormalize changes the metadata of deletes only: it
replaces each delete with the
+ // last stored row, which carries the metadata of the last upsert.
This matters only to a
+ // consumer of full deletes. Any other consumer relies only on the key
of a delete, whose
+ // metadata describes the delete itself (see DeleteKind#DELETE_BY_KEY).
+ if (requiredDeleteKind != DeleteKind.FULL_DELETE) {
Review Comment:
Yes, that is intended.
- From a data correctness point of view and kafka: that is even more
correct. The metadata is then the metadata of the actual delete and not of the
last upsert.
- From a flink perspective: that is totally fine since when only use the key
when we have key only deletions. We only need all deletion columns to match
exactly when we have full deletes.
--
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]