You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2025/08/18 18:24:00 UTC
[jira] [Resolved] (FLINK-38217) ChangelogNormalize unnecessarily emits updates for equal rows
[ https://issues.apache.org/jira/browse/FLINK-38217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Nuyanzin resolved FLINK-38217.
-------------------------------------
Fix Version/s: 2.2.0
Resolution: Fixed
> ChangelogNormalize unnecessarily emits updates for equal rows
> -------------------------------------------------------------
>
> Key: FLINK-38217
> URL: https://issues.apache.org/jira/browse/FLINK-38217
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Runtime
> Affects Versions: 2.0.0, 1.19.3, 1.20.2
> Reporter: Dawid Wysakowicz
> Assignee: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.2.0
>
>
> DeduplicateFunctionHelper has logic for skipping rows if the previous emitted row is the same as the new incoming record:
> * https://github.com/apache/flink/blob/e36309a420c4c30ad98026c192881784edc58b7f/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/deduplicate/utils/DeduplicateFunctionHelper.java#L120
> * https://github.com/apache/flink/blob/e36309a420c4c30ad98026c192881784edc58b7f/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/deduplicate/utils/DeduplicateFunctionHelper.java#L179
> Unfortunately it has a bug that it compares the entire Row including the RowKind. The Row stored in the state has always {{INSERT}} RowKind whereas the incoming records will have {{UPDATE_AFTER}} causing this optimisation to never trigger.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)