ChrisSamo632 commented on a change in pull request #4828:
URL: https://github.com/apache/nifi/pull/4828#discussion_r580569318
##########
File path:
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/JacksonCSVRecordReader.java
##########
@@ -108,6 +112,17 @@ public Record nextRecord(final boolean coerceTypes, final
boolean dropUnknownFie
rawFieldNames = schema.getFieldNames();
} else {
rawFieldNames = Arrays.asList(csvRecord);
+ if (rawFieldNames.size() > schema.getFieldCount() &&
!allowDuplicateHeaderNames) {
+ final Set<String> deDupe = new
HashSet<>(schema.getFieldCount());
Review comment:
Yes. But that's because I've replicated the same functionality as Apache
Commons CSV, which reports a single error (somewhat annoyingly).
We could indeed have a separate approach for Jackson (which I actually coded
first), but I decided to keep the experience as close as possible irrespective
of chosen Parser.
Happy to discuss/be overruled on that.
----------------------------------------------------------------
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]