gustavodemorais commented on code in PR #30182:
URL: https://github.com/apache/flink/pull/30182#discussion_r4753668397
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/definitions/DeduplicateDefinition.java:
##########
@@ -155,6 +157,16 @@ private static ChangelogMode inferChangelogMode(final
ChangelogContext changelog
if (requiredMode != null &&
requiredMode.contains(RowKind.UPDATE_BEFORE)) {
builder.addContainedKind(RowKind.UPDATE_BEFORE);
}
+ if (inputMode != null
+ && (inputMode.contains(RowKind.DELETE)
Review Comment:
Follow-up after looking into it: the planner decides whether the PTF emits
deletes in its first pass, before it knows whether updates carry -U. The
built-in operators handle this by deciding from the input alone, e.g.
GroupAggregate adds `DELETE` whenever its input has updates, and Rank always
declares all changes. Could we do the same here, i.e. add `DELETE` whenever the
input is not insert-only, and add the `page_counts` query above as a semantic
test?
--
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]