crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Barry (JIRA)" <>
Subject [jira] [Commented] (CRUNCH-564) Add support for using escape character same as open/close quote character
Date Tue, 29 Sep 2015 20:19:04 GMT


Nathan Barry commented on CRUNCH-564:

I'm guessing you are wanting to escape double quotes by using 2 double quotes in a row? 

such as:
"this line","has "" 2 double quotes in it"
"this line","has none"
"this line","has roast beef"

If so, I believe the CSVLineReader will handle that case automatically, not through setting
double quote as the escape character.  What happens if you set the escape character to backslash?
 Does the CSV file parse properly?

> Add support for using escape character same as open/close quote character
> -------------------------------------------------------------------------
>                 Key: CRUNCH-564
>                 URL:
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Muhammad
>            Assignee: Josh Wills
>            Priority: Trivial
>              Labels: csv, csvparser
> As a user I would like to use CSVInputFormat to handle the CSV files following this RFC
> Many developers use Apache StringEscapeUtils.escapeCsv( ) method to escape their CSVs.
The method escapes the CSV following the RFC4180. 
> The CSVLineReader throws exception in such a case. We can enhance the code to support
the CSVs that use escape same as the quote characters.
> I would appreciate a comment, if someone has knowingly rejected the idea due to some
technical limitation or a problem with allowing escape and quote as same characters. By the
way Apache HAWQ seem to get around this issue somehow and reads such CSVs alright.

This message was sent by Atlassian JIRA

View raw message