You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhilinli123 (via GitHub)" <gi...@apache.org> on 2023/03/13 04:37:37 UTC

[GitHub] [incubator-seatunnel] zhilinli123 commented on a diff in pull request #4328: [Feature][Connector-V2][Clickhouse] Clickhouse supports spaced write and is relatively real-time data source friendly

zhilinli123 commented on code in PR #4328:
URL: https://github.com/apache/incubator-seatunnel/pull/4328#discussion_r1133435146


##########
seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java:
##########
@@ -75,16 +87,17 @@ public void write(SeaTunnelRow element) throws IOException {
                             .indexOf(this.option.getShardMetadata().getShardKey());
             shardKey = element.getField(i);
         }
-        ClickhouseBatchStatement statement = statementMap.get(shardRouter.getShard(shardKey));
-        JdbcBatchStatementExecutor clickHouseStatement = statement.getJdbcBatchStatementExecutor();
-        IntHolder sizeHolder = statement.getIntHolder();
+        this.statement = statementMap.get(shardRouter.getShard(shardKey));
+        this.clickHouseStatement = statement.getJdbcBatchStatementExecutor();
+        this.sizeHolder = statement.getIntHolder();

Review Comment:
   Should it be?
   `statement = statementMap.get(shardRouter.getShard(shardKey));
   clickHouseStatement = statement.getJdbcBatchStatementExecutor();
   sizeHolder = statement.getIntHolder();
   `



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org