Gustavo de Morais created FLINK-40447:
-----------------------------------------

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


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)

Reply via email to