You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2025/08/08 13:14:00 UTC
[jira] [Created] (FLINK-38217) ChangelogNormalize unnecessarily emits updates for equal rows
Dawid Wysakowicz created FLINK-38217:
----------------------------------------
Summary: 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: 1.20.2, 1.19.3, 2.0.0
Reporter: Dawid Wysakowicz
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)