use of com.facebook.presto.orc.metadata.Stream.StreamKind.PRESENT in project presto by prestodb.
the class PresentOutputStream method getStreamDataOutput.
public Optional<StreamDataOutput> getStreamDataOutput(int column) {
checkArgument(closed);
if (booleanOutputStream == null) {
return Optional.empty();
}
StreamDataOutput streamDataOutput = booleanOutputStream.getStreamDataOutput(column);
// rewrite the DATA stream created by the boolean output stream to a PRESENT stream
Stream stream = new Stream(column, PRESENT, toIntExact(streamDataOutput.size()), streamDataOutput.getStream().isUseVInts());
return Optional.of(new StreamDataOutput(sliceOutput -> {
streamDataOutput.writeData(sliceOutput);
return stream.getLength();
}, stream));
}
Aggregations