gustavodemorais opened a new pull request, #29000: URL: https://github.com/apache/flink/pull/29000
## What is the purpose of the change A keyless upsert sink could stay in upsert-only mode even when its input carried no usable upsert key - either genuinely empty (a global aggregate/dedup reporting "at most one row"), or a mix of a real key and a spurious empty one that UpsertKeyUtil.getSmallestKey would then wrongly prefer. This PR forces a correct retract fallback in that case, and fixes a related bug in multi-arg upsert PTFs that produced the same empty-key shape. ## Brief change log - Fall back to retract for a keyless sink when the input's upsert-key candidates are empty or include an empty candidate. - Fix an off-by-offset bug in StreamPhysicalProcessTableFunction.toPartitionColumns for the second and later partitioned table arguments of a multi-arg PTF. - Strengthen DagOptimizationTest's upsertSink cases with a real key so the upsert/retract contrast reflects actual behavior instead of a coincidentally-passing keyless case. ## Verifying this change - ChangelogModeInferenceTest - DagOptimizationTest ## 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)`: no - 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? no - If yes, how is the feature documented? (n/a) --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) 2.1.235 (Claude Code) with Sonnet 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]
