Use current version of opencsv, update deprecated code, clean lint, and add support for newlines. - #24
Use current version of opencsv, update deprecated code, clean lint, and add support for newlines.#24woodrad wants to merge 7 commits into
Conversation
…hadoop.hive.Constants use.
…ows using the same seperator and escape works. Remove comment saying otherwise.
|
I took some time to test this using command-line hive on my local machine and learned some more things. As demonstrated by the tests I added, when given multiline Text, the SerDer correctly returns text with newlines stripped. However, the Text given to the SerDe is split before hitting the SerDe. Check it out. #hive -f test.hive Is there anything we can do to force Hive to give us the entire csv file as Text? |
|
Cleaning the deprecated parts is a dupe of #8. |
|
It looks like this project is dead, so I'll maintain my changes in my fork. I'll leave these notes in closing, however.
|
This request is rather large, sorry about that. Before submitting this pull request, I ran tests using Hive versions 0.11.0 through 0.14.0 in the pom--all passed. Note Hive 0.14.0 dependencies do not resolve automatically.
Here is a summary of the small changes I made.
Finally, a summary of why I am submitting this pull request in the first place. opencsv does an alright job of managing embedded line breaks in csv files (it strips carriage returns and breaks that are not \n), but using this SerDe with Hive results in NULLs after every row containing a line break. I've included tests and code that will take \n, \r, and \r\n and output them as , , and respectively. I've singled out these breaks because they're the only ones defined in the csv standard.
Let me know what you think. Maybe we can put our heads together and solve things like #18 and #3.