use of com.facebook.presto.orc.writer.SliceDictionaryColumnWriter in project presto by prestodb.
the class BenchmarkDictionaryWriter method getDictionaryColumnWriter.
private DictionaryColumnWriter getDictionaryColumnWriter(BenchmarkData data, boolean sortStringDictionaryKeys) {
DictionaryColumnWriter columnWriter;
Type type = data.getType();
ColumnWriterOptions columnWriterOptions = getColumnWriterOptions(sortStringDictionaryKeys);
if (type.equals(VARCHAR)) {
columnWriter = new SliceDictionaryColumnWriter(COLUMN_INDEX, type, columnWriterOptions, Optional.empty(), DWRF, DWRF.createMetadataWriter());
} else {
columnWriter = new LongDictionaryColumnWriter(COLUMN_INDEX, type, columnWriterOptions, Optional.empty(), DWRF, DWRF.createMetadataWriter());
}
return columnWriter;
}
Aggregations