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

Gustavo de Morais updated FLINK-40858:
--------------------------------------
    Fix Version/s: 2.3.1
                   2.2.2
                   2.4.0

> Streaming join should evaluate non-equi conditions on key-only deletes
> ----------------------------------------------------------------------
>
>                 Key: FLINK-40858
>                 URL: https://issues.apache.org/jira/browse/FLINK-40858
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>    Affects Versions: 2.3.0, 2.2.1, 1.20.5, 2.1.3
>            Reporter: Gustavo de Morais
>            Assignee: Gustavo de Morais
>            Priority: Major
>             Fix For: 2.2.2, 2.3.1, 2.4.0
>
>
> When a join input's upsert key contains the join key, the planner allows 
> key-only deletes (ChangelogMode#keyOnlyDeletes) into the join. The deletion 
> itself is correct, because the join removes the stored record by its unique 
> key. But the operator then evaluates the non-equi condition against the 
> incoming delete record, whose non-key columns are null. So it may retract the 
> wrong matches or none at all, which leaves stale joined rows and wrong null 
> padding.
> Example: {{{}L LEFT JOIN R ON L.k = R.k AND R.v > L.v{}}}, where R is an 
> upsert source with key-only deletes and the sink supports deletes by key.
>  
> {code:java}
> +I L(k=1, v=5)
> +I R(id=1, k=1, v=10)   -> +I[L, R]
> -D R(id=1, k=1)         -> v is null, condition is false, [L, R] is never 
> retracted {code}
>  
> Related: FLINK-40841.



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

Reply via email to