[ 
https://issues.apache.org/jira/browse/FLINK-36736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910828#comment-17910828
 ] 

Alexander Fedulov commented on FLINK-36736:
-------------------------------------------

[~jark] [~luoyuxia] since there are no open PRs for the fix and we are 
finalizing 1.20.1 I am moving this to the next patch release.
Please let me know if you still want to target 1.20.1 for the fix.

> 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
>             Fix For: 1.20.1
>
>
> 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
(v8.20.10#820010)

Reply via email to