Hi,
I think there is a inconsistent behaviour in parseRecord function of GenericCsvInputFormat, but I would like anybody confirm it.
When using readCsvFile and mapping to pojo objects with fields typed as String, the result of the parsing is diferent depending on the field position when having empty values
In case any field but the last, has empty values, the parseRecord function returns true. In case the last field has an empty value, in the for loop the startPos and limit are equal, and function returns false if lenient is tru or throws
an exception.
Example
Having a pojo with 3 attributes of type String and trying to parse the following records
String|String|String -> OK
||String -> OK
String|String| ->NOK
First two are correct but the last throws the ParseException in line 365
I think that or every null String makes to discard the records or the parsing should consider empty values at the end of the record.
What do you think?
Thanks
Regards
Free forum by Nabble | Edit this page |