mark-bathori commented on code in PR #10584:
URL: https://github.com/apache/nifi/pull/10584#discussion_r2585382746
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java:
##########
@@ -404,8 +405,10 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
// If we've reached the batch size, send
out the flow files
if (outputBatchSize > 0 &&
resultSetFlowFiles.size() >= outputBatchSize) {
session.transfer(resultSetFlowFiles,
REL_SUCCESS);
- // Need to remove the original input
file if it exists
- if (fileToProcess != null) {
+ // Need to remove the original input
file if it exists,
+ // but save the attributes to add them
to the failure flow file if it is created
+ if (fileToProcess != null &&
retainedFlowFileAttributes == null) {
Review Comment:
I think the `retainedFlowFileAttributes == null` check is unnecessary. If
`fileToProcess` is not null, we should always store the attributes and remove
the FlowFile.
--
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]