KuKuDeCheng commented on a change in pull request #4678:
URL: https://github.com/apache/nifi/pull/4678#discussion_r544010797
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
##########
@@ -766,6 +771,11 @@ private void executeDML(ProcessContext context,
ProcessSession session, FlowFile
if (DELETE_TYPE.equalsIgnoreCase(statementType)) {
ps.setObject(i * 2 + 1, currentValue, sqlType);
ps.setObject(i * 2 + 2, currentValue, sqlType);
+ } else if
(UPSERT_TYPE.equalsIgnoreCase(statementType)) {
+ final int timesToAddObjects =
databaseAdapter.getTimesToAddColumnObjectsForUpsert();
+ for (int j = 0; j < timesToAddObjects; j++) {
+ ps.setObject(i + (fieldIndexes.size() * j)
+ 1, currentValue, sqlType);
Review comment:
`fieldIndexes` in this place is NULL
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]