[
https://issues.apache.org/jira/browse/FLINK-40111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Walther closed FLINK-40111.
--------------------------------
Fix Version/s: 2.4.0
Resolution: Fixed
Fixed in master: 4732a5210a876a55a9367e31f3aa9f8cf0f45fd7
> Keyless upsert sink should fall back to retract when the input has no upsert
> key
> --------------------------------------------------------------------------------
>
> Key: FLINK-40111
> URL: https://issues.apache.org/jira/browse/FLINK-40111
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> When a sink without a primary key advertises an upsert changelog
> (ONLY_UPDATE_AFTER), {{FlinkChangelogModeInferenceProgram}} currently always
> lets the planner keep UPDATE_AFTER-only, regardless of the input. A keyless
> sink has no key for the downstream to apply updates by, so an unkeyed upsert
> stream cannot be materialized correctly.
> Make {{inferSinkRequiredTraits}} fall back to BEFORE_AND_AFTER (retract) for
> a keyless sink when the input produces no upsert key. When the input can
> produce UPDATE_BEFORE (e.g. via ChangelogNormalize), the query then plans as
> retract instead of failing; when it cannot, planning fails as before.
> Keyed-sink behavior is unchanged.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)