hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferdinand Xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-14679) csv2/tsv2 output format disables quoting by default and it's difficult to enable
Date Thu, 13 Oct 2016 14:41:21 GMT

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

Ferdinand Xu commented on HIVE-14679:
-------------------------------------

bq. It optional for the original sv formats and not affect the csv2/tsv2 formats

You can see the code for HIVE-9788 that by default the quoting is disabled. And it is about
csv2/tsv2 as the release note said I think. But it has been a while and need double check.
[~JonnyR], can you please confirm this?
{noformat}
+  private boolean isQuotingDisabled() {
+    String quotingDisabledStr = System.getProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV);
+    if (quotingDisabledStr == null || quotingDisabledStr.isEmpty()) {
+      // default is disabling the double quoting for separated value
+      return true;
+    }
+    String parsedOptionStr = quotingDisabledStr.toLowerCase();
+    if (parsedOptionStr.equals("false") || parsedOptionStr.equals("true")) {
+      return Boolean.valueOf(parsedOptionStr);
+    } else {
+      beeLine.error("System Property disable.quoting.for.sv is now " + parsedOptionStr
+          + " which only accepts boolean value");
+      return true;
+    }
+  }
{noformat}



> csv2/tsv2 output format disables quoting by default and it's difficult to enable
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-14679
>                 URL: https://issues.apache.org/jira/browse/HIVE-14679
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Brock Noland
>            Assignee: Jianguo Tian
>
> Over in HIVE-9788 we made quoting optional for csv2/tsv2.
> However I see the following issues:
> * JIRA doc doesn't mention it's disabled by default, this should be there an in the output
of beeline help.
> * The JIRA says the property is {{--disableQuotingForSV}} but it's actually a system
property. We should not use a system property as it's non-standard so extremely hard for users
to set. For example I must do: {{env HADOOP_CLIENT_OPTS="-Ddisable.quoting.for.sv=false" beeline
...}}
> * The arg {{--disableQuotingForSV}} should be documented in beeline help.



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

Mime
View raw message