use of org.supercsv.encoder.CsvEncoder in project hive by apache.
the class SeparatedValuesOutputFormat method getCsvPreference.
private CsvPreference getCsvPreference() {
char separator = this.defaultSeparator;
char quoteChar = DEFAULT_QUOTE_CHAR;
CsvEncoder encoder;
if (DSV_OPT_OUTPUT_FORMAT.equals(beeLine.getOpts().getOutputFormat())) {
separator = beeLine.getOpts().getDelimiterForDSV();
}
if (isQuotingDisabled()) {
quoteChar = '\0';
encoder = new SelectiveCsvEncoder();
} else {
encoder = new DefaultCsvEncoder();
}
return new CsvPreference.Builder(quoteChar, separator, StringUtils.EMPTY).useEncoder(encoder).build();
}
Aggregations