You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ferenc Csaky (Jira)" <ji...@apache.org> on 2025/05/15 15:57:00 UTC

[jira] [Updated] (FLINK-36736) DynamicTableSink.Context#getTargetColumns should contains all the columns that sink function will receive

     [ https://issues.apache.org/jira/browse/FLINK-36736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferenc Csaky updated FLINK-36736:
---------------------------------
    Fix Version/s: 1.20.3
                       (was: 1.20.2)

> 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.3
>
>
> 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)