Search in sources :

Example 1 with LongDictionaryColumnWriter

use of com.facebook.presto.orc.writer.LongDictionaryColumnWriter 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;
}
Also used : Type(com.facebook.presto.common.type.Type) SliceDictionaryColumnWriter(com.facebook.presto.orc.writer.SliceDictionaryColumnWriter) LongDictionaryColumnWriter(com.facebook.presto.orc.writer.LongDictionaryColumnWriter) DictionaryColumnWriter(com.facebook.presto.orc.writer.DictionaryColumnWriter) SliceDictionaryColumnWriter(com.facebook.presto.orc.writer.SliceDictionaryColumnWriter) LongDictionaryColumnWriter(com.facebook.presto.orc.writer.LongDictionaryColumnWriter)

Aggregations

Type (com.facebook.presto.common.type.Type)1 DictionaryColumnWriter (com.facebook.presto.orc.writer.DictionaryColumnWriter)1 LongDictionaryColumnWriter (com.facebook.presto.orc.writer.LongDictionaryColumnWriter)1 SliceDictionaryColumnWriter (com.facebook.presto.orc.writer.SliceDictionaryColumnWriter)1