[
https://issues.apache.org/jira/browse/FLINK-36736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137660#comment-18137660
]
Rui Fan commented on FLINK-36736:
---------------------------------
[~luoyuxia] This has been moved across several releases without progress, so
I'm removing the fix version. Please set it again once a fix is ready.
> 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)