anshuksi282-ksolves opened a new pull request, #11939: URL: https://github.com/apache/nifi/pull/11939
## Summary [NIFI-16600](https://issues.apache.org/jira/browse/NIFI-16600) Fixes `FastCSVRecordReader` reading the first data row as the header when `Treat First Line as Header` is `false`. The constructor builds the header map from the Record Schema when there is no header line, but `getRecordFields()` always consumed the first CSV record and replaced that map. The first row was lost and the remaining rows were mapped to the wrong field names. The header row is now read only when `hasHeader` is `true`, which matches the behavior of the Apache Commons CSV and Jackson CSV readers. A new test in `TestFastCSVRecordReader` covers reading records without a header line. ## Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000` - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000` - [x] Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status ### Pull Request Formatting - [x] Pull Request based on current revision of the `main` branch - [x] Pull Request refers to a feature branch with one commit containing changes ## Verification ### Build - [x] Build completed using `./mvnw clean install -P contrib-check` - [x] JDK 21 - [ ] JDK 25 ### Licensing - [ ] New dependencies are compatible with the Apache License 2.0 - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] Documentation formatting appears as expected in rendered files -- 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]
