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/10/01 13:04:00 UTC
[jira] [Assigned] (FLINK-40858) Streaming join should evaluate non-equi conditions on key-only deletes
[ https://issues.apache.org/jira/browse/FLINK-40858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gustavo de Morais reassigned FLINK-40858:
-----------------------------------------
Assignee: Gustavo de Morais
> 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, 2.1.3
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
>
> 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)