umustafi commented on a change in pull request #3438:
URL: https://github.com/apache/gobblin/pull/3438#discussion_r764456963



##########
File path: 
gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlBufferedInserter.java
##########
@@ -84,6 +93,26 @@ protected void initializeBatch(String databaseName, String 
table)
           + " due to # of params limitation " + this.maxParamSize + " , # of 
columns: " + this.columnNames.size());
     }
     this.batchSize = actualBatchSize;
-    super.initializeBatch(databaseName, table);
+
+    // Use separate insertion statement if replacements are allowed
+    if (this.replaceExistingValues) {
+        this.insertStmtPrefix = createReplaceStatementStr(databaseName, table);

Review comment:
       Great idea, modified to override `createInsertStatementStr` to avoid 
reassigning base class fields in the child class




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to