Search in sources :

Example 6 with ColumnEncodingKind

use of com.facebook.presto.orc.metadata.ColumnEncoding.ColumnEncodingKind in project presto by prestodb.

the class LongStreamReader method startStripe.

@Override
public void startStripe(StreamSources dictionaryStreamSources, List<ColumnEncoding> encoding) throws IOException {
    ColumnEncodingKind kind = encoding.get(streamDescriptor.getStreamId()).getColumnEncodingKind();
    if (kind == DIRECT || kind == DIRECT_V2 || kind == DWRF_DIRECT) {
        currentReader = directReader;
    } else if (kind == DICTIONARY) {
        currentReader = dictionaryReader;
    } else {
        throw new IllegalArgumentException("Unsupported encoding " + kind);
    }
    currentReader.startStripe(dictionaryStreamSources, encoding);
}
Also used : ColumnEncodingKind(com.facebook.presto.orc.metadata.ColumnEncoding.ColumnEncodingKind)

Aggregations

ColumnEncodingKind (com.facebook.presto.orc.metadata.ColumnEncoding.ColumnEncodingKind)6 Stream (com.facebook.presto.orc.metadata.Stream)4 ImmutableMap (com.google.common.collect.ImmutableMap)4 OrcTypeKind (com.facebook.presto.orc.metadata.OrcType.OrcTypeKind)3 OrcInputStream (com.facebook.presto.orc.stream.OrcInputStream)3 ValueStream (com.facebook.presto.orc.stream.ValueStream)3 InputStream (java.io.InputStream)3 CheckpointStreamSource.createCheckpointStreamSource (com.facebook.presto.orc.stream.CheckpointStreamSource.createCheckpointStreamSource)2 StreamSource (com.facebook.presto.orc.stream.StreamSource)2 StreamSources (com.facebook.presto.orc.stream.StreamSources)2 ValueStreamSource (com.facebook.presto.orc.stream.ValueStreamSource)2 StreamId (com.facebook.presto.orc.StreamId)1 Checkpoints.getDictionaryStreamCheckpoint (com.facebook.presto.orc.checkpoint.Checkpoints.getDictionaryStreamCheckpoint)1 InputStreamCheckpoint.createInputStreamCheckpoint (com.facebook.presto.orc.checkpoint.InputStreamCheckpoint.createInputStreamCheckpoint)1 InvalidCheckpointException (com.facebook.presto.orc.checkpoint.InvalidCheckpointException)1 StreamCheckpoint (com.facebook.presto.orc.checkpoint.StreamCheckpoint)1 ColumnEncoding (com.facebook.presto.orc.metadata.ColumnEncoding)1 StreamKind (com.facebook.presto.orc.metadata.Stream.StreamKind)1 StripeFooter (com.facebook.presto.orc.metadata.StripeFooter)1 ImmutableList (com.google.common.collect.ImmutableList)1