use of com.facebook.presto.orc.stream.LongOutputStreamDwrf in project presto by prestodb.
the class TestLongDictionaryProvider method createSliceOutput.
private DynamicSliceOutput createSliceOutput(StreamId streamId, long[] data) {
LongOutputStreamDwrf outputStream = new LongOutputStreamDwrf(getColumnWriterOptions(), Optional.empty(), true, DICTIONARY_DATA);
for (long val : data) {
outputStream.writeLong(val);
}
outputStream.close();
DynamicSliceOutput sliceOutput = new DynamicSliceOutput(1000);
StreamDataOutput streamDataOutput = outputStream.getStreamDataOutput(streamId.getColumn());
streamDataOutput.writeData(sliceOutput);
return sliceOutput;
}
use of com.facebook.presto.orc.stream.LongOutputStreamDwrf in project presto by prestodb.
the class LongDictionaryColumnWriter method resetDictionary.
@Override
protected void resetDictionary() {
columnEncoding = null;
dictionary = new LongDictionaryBuilder(EXPECTED_ENTRIES);
dictionaryDataStream = new LongOutputStreamDwrf(columnWriterOptions, dwrfEncryptor, true, DICTIONARY_DATA);
statisticsBuilder = new IntegerStatisticsBuilder();
}
Aggregations