[ https://issues.apache.org/jira/browse/FLINK-33790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814125#comment-17814125 ]
Jeyhun Karimov commented on FLINK-33790: ---------------------------------------- Hi [~lijingwei.5018] thanks for reporting this issue. There is a similar test in {code:java} FieldNamedPreparedStatementImplTest::testUpsertStatement {code} with key fields with field names = {code:java} {"id", "name", "email", "ts", "field1", "field_2", "__field_3__"} {code} and key fields = {code:java} {"id", "__field_3__"} {code} The test seems passing. Am I missing something? > Upsert statement filter unique key field colume in mysql dielact > ----------------------------------------------------------------- > > Key: FLINK-33790 > URL: https://issues.apache.org/jira/browse/FLINK-33790 > Project: Flink > Issue Type: Improvement > Components: Connectors / JDBC > Reporter: JingWei Li > Priority: Minor > > example: `col2` and `col4` is unique key in table `my_table` > > {code:java} > INSERT INTO `my_table`(`col1`, `col2`, `col3`, `col4`, `col5`) > VALUES (?, ?, ?, ?, ?) > ON DUPLICATE KEY UPDATE > `col1`=VALUES(`col1`), > `col2`=VALUES(`col2`), > `col3`=VALUES(`col3`), > `col4`=VALUES(`col4`), > `col5`=VALUES(`col5`){code} > result: > {code:java} > INSERT INTO `my_table`(`col1`, `col2`, `col3`, `col4`, `col5`) > VALUES (?, ?, ?, ?, ?) > ON DUPLICATE KEY UPDATE > `col1`=VALUES(`col1`), > `col3`=VALUES(`col3`), > `col5`=VALUES(`col5`) {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)