gustavodemorais opened a new pull request, #350:
URL: https://github.com/apache/flink-connector-kafka/pull/350

   ## What is the purpose of the change
   
   The upsert-kafka source declares full deletes, but a Kafka tombstone becomes 
a DELETE row with only the key set and NULL value columns. Since FLINK-37475 
the planner trusts this label and drops the `ChangelogNormalize` for consumers 
that require full deletes, which then receive NULL-valued deletes (e.g. a 
row-semantic `TO_CHANGELOG` with an `op_mapping` that has DELETE but no 
UPDATE_BEFORE). This pull request declares key-only deletes, so the planner 
keeps the `ChangelogNormalize` where full deletes are required.
   
   Note: an upsert-kafka source feeding an upsert-kafka sink with the same 
primary key gets a `ChangelogNormalize` again, since the sink still requires 
full deletes. FLINK-41534 relaxes this on the sink side.
   
   ## Brief change log
   
     - The upsert-kafka source changelog mode declares `keyOnlyDeletes(true)`
   
   ## Verifying this change
   
     - `UpsertKafkaDynamicTableFactoryTest#testTableSource` asserts the 
key-only deletes
     - 
`UpsertKafkaDynamicTableFactoryTest#testChangelogNormalizeIsKeptForConsumerRequiringFullDeletes`
 asserts the planner keeps the `ChangelogNormalize` for a consumer requiring 
full deletes (fails without the fix)
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency, including 
`kafka.version` or `flink.version`): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)` or `@Experimental`, or are the Table options or the PyFlink 
wrappers changed: no
     - Checkpointed state, its serializers, or exactly-once delivery (splits, 
enumerator state, writer state, committables, transactions): no
     - The per-record code paths (split reader, record emitter, writer, 
serialization schemas; performance sensitive): no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
     - If the docs changed, are both `docs/content` and `docs/content.zh` 
updated? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   2.1.304 (Claude Code) with Opus 5.5
   


-- 
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]

Reply via email to