You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Gustavo de Morais (Jira)" <ji...@apache.org> on 2026/08/21 14:25:00 UTC

[jira] [Closed] (FLINK-40447) Keyless upsert sink can silently drop retract semantics when upsert-key metadata is empty or mixed

     [ https://issues.apache.org/jira/browse/FLINK-40447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gustavo de Morais closed FLINK-40447.
-------------------------------------
    Fix Version/s: 2.4.0
       Resolution: Fixed

Fixed in master: 2245026dff55e1348356ff472ee42c716710bbba

> Keyless upsert sink can silently drop retract semantics when upsert-key metadata is empty or mixed
> --------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-40447
>                 URL: https://issues.apache.org/jira/browse/FLINK-40447
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 2.4.0
>            Reporter: Gustavo de Morais
>            Assignee: Gustavo de Morais
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.4.0
>
>
> FlinkChangelogModeInferenceProgram only forces a keyless upsert sink to fall back to full retract when every candidate upsert key is empty (forall). When the candidate set mixes a real key with a spurious empty one (e.g. a lookup join probed by a global aggregate), the guard misses it and UpsertKeyUtil.getSmallestKey picks the unusable empty key, silently corrupting output.
>  
> Potential fix: trigger retract fallback if any candidate is empty (exists). Also fixes a related off-by-offset bug in StreamPhysicalProcessTableFunction.toPartitionColumns that produced the same empty-key shape for multi-arg upsert PTFs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)