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

   ## What is the purpose of the change
   
   Lets TO_CHANGELOG produce an upsert stream (instead of always retract) when 
called with PARTITION BY and an op_mapping that omits UPDATE_BEFORE and/or 
DELETE. The planner can then skip the stateful ChangelogNormalize operator that 
would otherwise materialize those rows.
   
   ## Brief change log
   
   - Add TraitCondition.mapArgIncludesKey factory and 
BuiltInCondition.Kind.MAP_ARG_INCLUDES_KEY
   - Make REQUIRE_UPDATE_BEFORE and REQUIRE_FULL_DELETE conditional on 
op_mapping in TO_CHANGELOG
   - Reject user-supplied op_mapping entries referencing change kinds the input 
cannot produce
   - Add plan tests for the new conditional-trait combinations
   - Add semantic test for the new validation
   - Document the optimization under TO_CHANGELOG
   
   ## Verifying this change
   
   - ToChangelogRestoreTest (existing)
   - ToChangelogTest (Added new)
   - ToChangelogSemanticTests (Added new)
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes - TraitCondition is @PublicEvolving and gains a new 
factory
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? yes
   - If yes, how is the feature documented? 
(docs/content/docs/sql/reference/queries/changelog.md, JavaDoc on 
TraitCondition.mapArgIncludesKey and 
ToChangelogFunction.validateAgainstInputChangelogMode)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   2.1.117 (Claude Code) & Opus 4.7


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