exceptionfactory commented on code in PR #10061:
URL: https://github.com/apache/nifi/pull/10061#discussion_r2190826879
##########
nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVRecordSetWriter.java:
##########
@@ -44,6 +44,7 @@
+ "will be the column names (unless the 'Include Header Line' property is
false). All subsequent lines will be the values "
+ "corresponding to the record fields.")
public class CSVRecordSetWriter extends DateTimeTextRecordSetWriter implements
RecordSetWriterFactory {
+private static final org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(CSVRecordSetWriter.class);
Review Comment:
The logging additions are not necessary and should be reverted.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestExecuteSQLRecord.java:
##########
@@ -116,6 +116,7 @@ public void setup() throws InitializationException {
final Map<String, String> dbcpProperties = new HashMap<>();
runner = TestRunners.newTestRunner(ExecuteSQLRecord.class);
+ runner.setValidateExpressionUsage(false);
Review Comment:
Disabling expression language validation does not look like a suitable
approach, the actual reasons behind the failure should be revisited.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/sql/RecordSqlWriter.java:
##########
@@ -56,12 +56,15 @@ public class RecordSqlWriter implements SqlWriter {
private String mimeType;
public RecordSqlWriter(RecordSetWriterFactory recordSetWriterFactory,
AvroConversionOptions options, int maxRowsPerFlowFile, Map<String, String>
originalAttributes) {
- this.recordSetWriterFactory = recordSetWriterFactory;
- this.writeResultRef = new AtomicReference<>();
- this.maxRowsPerFlowFile = maxRowsPerFlowFile;
- this.options = options;
- this.originalAttributes = originalAttributes;
- }
+ this.writeResultRef = new AtomicReference<>();
+ this.maxRowsPerFlowFile = maxRowsPerFlowFile;
+ this.recordSetWriterFactory = recordSetWriterFactory;
+ this.originalAttributes = originalAttributes;
+
+
+ // Create a new AvroConversionOptions with the evaluated options
+ this.options = options;
Review Comment:
This changes should be reverted.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/sql/RecordSqlWriter.java:
##########
@@ -33,7 +33,7 @@
import org.apache.nifi.util.db.JdbcCommon;
import java.io.IOException;
-import java.io.OutputStream;
+import java.io.OutputStream;
Review Comment:
This change should be reverted.
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteSQLRecord.java:
##########
@@ -39,9 +39,7 @@
import org.apache.nifi.serialization.RecordSetWriterFactory;
import org.apache.nifi.util.db.JdbcCommon;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
Review Comment:
Wildcard imports are disallowed based on the project Checkstyle, so this
should be reverted.
--
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]