Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2473#discussion_r175002310
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/csv/TestCSVRecordReader.java
---
@@ -124,6 +324,24 @@ public void testSimpleParse() throws IOException,
MalformedRecordException {
}
}
+ @Test
+ public void testSimpleParseCustomDate() throws IOException,
MalformedRecordException {
+ final List<RecordField> fields = getDefaultFields();
+ fields.replaceAll(f -> f.getFieldName().equals("balance") ? new
RecordField("balance", doubleDataType) : f);
+
+ final RecordSchema schema = new SimpleRecordSchema(fields);
+
+ try (final InputStream fis = new FileInputStream(new
File("src/test/resources/csv/single-bank-account.csv"));
+ final CSVRecordReader reader = createReader(fis, schema,
format)) {
--- End diff --
From the method name, I assume you wanted to pass custom date format to
call the newly added createReader method with specified format here. Is that
correct? Probably we need to add a date field in the test data, e.g. birth date
or updated_timestamp.
---