Gustavo de Morais created FLINK-41803:
-----------------------------------------

             Summary: Ignore metadata columns for ChangelogNormalize when the 
consumer accepts key-only deletes
                 Key: FLINK-41803
                 URL: https://issues.apache.org/jira/browse/FLINK-41803
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner
            Reporter: Gustavo de Morais
            Assignee: Gustavo de Morais


{{ChangelogNormalizeRequirementResolver}} keeps a ChangelogNormalize whenever 
metadata columns are read, even when the consumer accepts key-only deletes. 
ChangelogNormalize only changes the metadata of deletes: it replaces each 
delete with the last stored row, which carries the metadata of the last upsert. 
A consumer of key-only deletes relies only on the key, and the metadata of a 
key-only delete describes the delete itself, like the timestamp and headers of 
a Kafka tombstone.

We should only require ChangelogNormalize for metadata columns when the 
consumer requires full deletes. For example, an upsert source with key-only 
deletes and a metadata column written into an upsert sink no longer needs a 
ChangelogNormalize, and deletes carry their own metadata instead of the last 
row's.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to