saleemno1 commented on PR #626:
URL: https://github.com/apache/commons-csv/pull/626#issuecomment-5262797285
Rebased on master (had one trivial conflict where both branches added a
private test helper, kept both) and pushed. Full CSVParserTest/CSVPrinterTest
suite is green.
On whether it's a bug: the way I see it, the printer already treats these
two cases as distinct on the write side. For nullString `\N`, a real null is
written verbatim as `\N`, but a field whose value is literally `\N` gets
escaped to `\\N` precisely so it doesn't collide with the null marker. The
parser was then unescaping `\\N` back to `\N` and mapping it to null, so
`printRecord("\\N", null)` doesn't survive a print/parse round trip: the first
field silently becomes null. So it's less about defining new behavior and more
that parse wasn't the inverse of print for this one case.
That said, it's your call whether that round trip is something the library
promises. If you'd rather leave it undefined I'm happy to close this out; if
it's worth fixing, this keeps the existing null handling intact and only
diverges on the escaped case.
--
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]