gustavodemorais opened a new pull request, #28120:
URL: https://github.com/apache/flink/pull/28120

   ## What is the purpose of the change
   
   `TO_CHANGELOG` was locked to row semantics. `PARTITION BY` silently 
duplicated the partition key in the output. This PR honors the conditional 
`SET_SEMANTIC_TABLE` trait declared in FLINK-39392: when `PARTITION BY` is 
provided, the framework prepends the partition key and the function emits the 
rest. Output: `[partition_key, op, ...other input fields]`.
   
   ## Brief change log
   
   - Added `ChangelogTypeStrategyUtils#computeOutputIndices` helper (shared 
with `FROM_CHANGELOG` once FLINK-39537 lands).
   - Wired `ToChangelogTypeStrategy` and `ToChangelogFunction` to drop 
partition keys from the declared/emitted schema.
   - Added semantic tests for leading and middle-column partition keys; updated 
the existing plan test golden XML.
   
   ## Verifying this change
   
   Covered by `ToChangelogSemanticTests` (two new test programs) and the 
updated `ToChangelogTest#testRetractPartitionBy` plan test.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies: no
     - The public API: no
     - The serializers: no
     - The runtime per-record code paths: no
     - Deployment / recovery: no
     - S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no (fixes broken 
behavior)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   2.1.117 (Claude Code)


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