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

Flink Jira Bot updated FLINK-27807:
-----------------------------------
      Labels: auto-deprioritized-minor pull-request-available  (was: 
pull-request-available stale-minor)
    Priority: Not a Priority  (was: Minor)

This issue was labeled "stale-minor" 7 days ago and has not received any 
updates so it is being deprioritized. If this ticket is actually Minor, please 
raise the priority and ask a committer to assign you the issue or revive the 
public discussion.


> The improvement of addBatch is empty when jdbc batch submit
> -----------------------------------------------------------
>
>                 Key: FLINK-27807
>                 URL: https://issues.apache.org/jira/browse/FLINK-27807
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / JDBC
>    Affects Versions: 1.14.4, 1.15.0
>            Reporter: shmily
>            Priority: Not a Priority
>              Labels: auto-deprioritized-minor, pull-request-available
>
> Extending the DM database dialect through JDBC, when executing Upsert 
> semantics, a "parameter not bound" exception will be thrown, and it is found 
> that the following code can be improved: 
> {code:java}
> for (Map.Entry<RowData, Tuple2<Boolean, RowData>> entry : 
> reduceBuffer.entrySet()) {
>     if (entry.getValue().f0) {
>         upsertExecutor.addToBatch(entry.getValue().f1);
>     } else {
>     // delete by key
>     deleteExecutor.addToBatch(entry.getKey());
>     }
> }
> upsertExecutor.executeBatch();
> deleteExecutor.executeBatch();
> reduceBuffer.clear();{code}
> That is to say, when the size of reduceBuffer is 1, only one of the if-else 
> statement blocks is executed, which will cause
> {code:java}
>  upsertExecutor().executeBatch() {code}
> or 
> {code:java}
> deleteExecutor.executeBatch(){code}
>  to have an empty batch executed, however, this will cause some jdbc driver 
> implementations to throw exceptions, as described above



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to