commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [commons-csv] lbruun opened a new pull request #51: [CSV-253] Handle absent values in input
Date Mon, 28 Oct 2019 21:13:23 GMT
lbruun opened a new pull request #51: [CSV-253] Handle absent values in input
   Being able to appropriately translate an absent value in CSV input with a Java `null` value.
Previously, there was no way to do this, such a value would at best become a zero-length string
when parsing. This made it impossible to correctly parse CSV output from say databases.
   In reference to [CSV-253](
   The PR addresses the issue by adding a flag on `Token` so that it becomes possible to distinguish
between a token which is the result of an absent value in input or an actual zero-length string.
A new modifier, `absentIsNull` is introduced on `CSVFormat`.   All existing formats and functionality
is kept as-is, meaning the new feature is fully based on opt-in.
   As a possible next step the pre-defined CSV formats for databases (i.e. `INFORMIX_UNLOAD_CSV`,
`MYSQL`, `ORACLE` and `POSTGRESQL_CSV`) should be reviewed. I suspect that at least `POSTGRESQL_CSV`
has always been incorrect in this matter. With this PR is can be corrected.

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:

With regards,
Apache Git Services

View raw message