You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/08/19 13:20:53 UTC
[GitHub] [flink] AHeise commented on a change in pull request #16895: [FLINK-23813][connectors/jdbc] Update delete executor in TableJdbcUpsertOutputFormat ...
AHeise commented on a change in pull request #16895:
URL: https://github.com/apache/flink/pull/16895#discussion_r692101138
##########
File path: flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/TableJdbcUpsertOutputFormat.java
##########
@@ -45,32 +45,43 @@
private static final Logger LOG = LoggerFactory.getLogger(TableJdbcUpsertOutputFormat.class);
private JdbcBatchStatementExecutor<Row> deleteExecutor;
- private final JdbcDmlOptions dmlOptions;
+ private final StatementExecutorFactory<JdbcBatchStatementExecutor<Row>>
+ deleteStatementExecutorFactory;
TableJdbcUpsertOutputFormat(
JdbcConnectionProvider connectionProvider,
JdbcDmlOptions dmlOptions,
JdbcExecutionOptions batchOptions) {
- super(
+ this(
connectionProvider,
batchOptions,
ctx -> createUpsertRowExecutor(dmlOptions, ctx),
- tuple2 -> tuple2.f1);
- this.dmlOptions = dmlOptions;
+ ctx -> createDeleteExecutor(dmlOptions, ctx));
+ }
+
+ TableJdbcUpsertOutputFormat(
Review comment:
`@VisibleForTesting`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org