-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV-215 CSV Record mutability #21
base: master
Are you sure you want to change the base?
Conversation
I do not like the mutability toggle. Our options, I think are:
and document that the CSVRecord class is now mutable. This is the simplest solution. Alternatively, if we are hard core about maintaining CSVRecord as immutable, we can talk about that. BUT, note that the fact that the current implementation is immutable is NOT documented, all we say in the CSVRecord Javadoc is: "A CSV record parsed from a CSV file." |
The toggle was just an option to keep immutability in some sense. But Making it mutable and documenting it looks better. Wan't another pull request ? |
Up to you. I do not think we've reached any kind of consensus on the dev ML though. |
I'll wait then. |
Personally I don't like the "mutability" toggle and would prefer to have a setter - basically I see two options to implement the setter
|
Hi @nmahendru and all, Starting in version 1.10.0, you can use the method Therefore, I think this PR can be closed. |
I want to push another change which I feel will also be useful for the community. I want to add a CSVRecordMutable class which had a constructor which accepts a CSVRecord object. So when we have a CSVRecordMutable object from it then we can edit individual columns using it.
I would be using this to write back my edited CSV file. My use case is to read a csv, mangle some columns, write back a new csv.