[
https://issues.apache.org/jira/browse/FLINK-36736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rui Fan updated FLINK-36736:
----------------------------
Fix Version/s: (was: 1.20.6)
> DynamicTableSink.Context#getTargetColumns should contains all the columns
> that sink function will receive
> ---------------------------------------------------------------------------------------------------------
>
> Key: FLINK-36736
> URL: https://issues.apache.org/jira/browse/FLINK-36736
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Reporter: Jark Wu
> Assignee: luoyuxia
> Priority: Critical
> Labels: pull-request-available
>
> If there is an update statement {{UPDATE t1 SET a = 1 WHERE id = 2}} on the
> table t1 with schema {{[int id, int a, string b]}}, the
> {{DynamicTableSink.Context#getTargetColumns}} will return only the updated
> column {{[a]}}. This is incorrect and should return column {{[id, a]}}.
> Because underlying, the update statement should be translated into {{INSERT
> INTO t1 (id, a) SELECT id, a FROM t1 WHERE id = 2}}, and the target column of
> {{INSERT INTO}} is {{id, a}}. Without the column {{id}}, sink function can't
> apply the updated values to the specified rows.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)