use of com.facebook.presto.orc.writer.LongColumnWriter in project presto by prestodb.
the class BenchmarkDictionaryWriter method writeDirect.
@Benchmark
public void writeDirect(BenchmarkData data) {
ColumnWriter columnWriter;
Type type = data.getType();
if (type.equals(VARCHAR)) {
columnWriter = new SliceDirectColumnWriter(COLUMN_INDEX, type, getColumnWriterOptions(), Optional.empty(), DWRF, this::newStringStatisticsBuilder, DWRF.createMetadataWriter());
} else {
columnWriter = new LongColumnWriter(COLUMN_INDEX, type, getColumnWriterOptions(), Optional.empty(), DWRF, IntegerStatisticsBuilder::new, DWRF.createMetadataWriter());
}
for (Block block : data.getBlocks()) {
columnWriter.beginRowGroup();
columnWriter.writeBlock(block);
columnWriter.finishRowGroup();
}
columnWriter.close();
columnWriter.reset();
}
Aggregations