[ 
https://issues.apache.org/jira/browse/HIVE-9788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340457#comment-14340457
 ] 

Naveen Gangam commented on HIVE-9788:
-------------------------------------

Hey [~Ferd],
A couple of things with this issue.
IMHO, the double quotes around data is bug and not a feature, as it does not 
returning data in its original form. I do not see a reason to retain that 
behavior.
Also the printRowWithQuote() does not make use of the CSV APIs to format the 
output string. May I suggest that we use something like this? 
{code}
-    csvPreference = new CsvPreference.Builder('"', separator, "").build();
+    csvPreference = new CsvPreference.Builder('\0', separator, "").build(); 
{code}
The above uses a null character for a QUOTE character instead if a QUOTE 
character. So any data containing QUOTEs will not be surrounded with the QUOTE 
character from the CsvPreference instance.
This instance can then be passed into CsvListWriter that returns data as-is 
without the "". Hope this helps.

> Make double quote optional in tsv/csv/dsv output
> ------------------------------------------------
>
>                 Key: HIVE-9788
>                 URL: https://issues.apache.org/jira/browse/HIVE-9788
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Brock Noland
>            Assignee: Ferdinand Xu
>         Attachments: HIVE-9788.patch
>
>
> Similar to HIVE-7390 some customers would like the double quotes to be 
> optional. So if the data is {{"A"}} then the output from beeline should be 
> {{"A"}} which is the same as the Hive CLI.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to