[
https://issues.apache.org/jira/browse/FLINK-40858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123300#comment-18123300
]
Gustavo de Morais edited comment on FLINK-40858 at 10/7/26 9:55 AM:
--------------------------------------------------------------------
Fixed in master: 5afe863af6262ba6600cebaa73578fa95511e89a
was (Author: JIRAUSER307895):
Fixed in master: 360500e2a0c6301082fc2b85b1f2b9de4bc5e775
> 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
>
> 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)