Search in sources :

Example 6 with InputStreamSources

use of com.facebook.presto.orc.stream.InputStreamSources in project presto by prestodb.

the class SliceDictionarySelectiveReader method startStripe.

@Override
public void startStripe(Stripe stripe) {
    InputStreamSources dictionaryStreamSources = stripe.getDictionaryStreamSources();
    stripeDictionaryDataStreamSource = dictionaryStreamSources.getInputStreamSource(streamDescriptor, DICTIONARY_DATA, ByteArrayInputStream.class);
    stripeDictionaryLengthStreamSource = dictionaryStreamSources.getInputStreamSource(streamDescriptor, LENGTH, LongInputStream.class);
    stripeDictionarySize = stripe.getColumnEncodings().get(streamDescriptor.getStreamId()).getColumnEncoding(streamDescriptor.getSequence()).getDictionarySize();
    stripeDictionaryOpen = false;
    presentStreamSource = missingStreamSource(BooleanInputStream.class);
    dataStreamSource = missingStreamSource(LongInputStream.class);
    inDictionaryStreamSource = missingStreamSource(BooleanInputStream.class);
    rowGroupDictionaryLengthStreamSource = missingStreamSource(RowGroupDictionaryLengthInputStream.class);
    rowGroupDictionaryDataStreamSource = missingStreamSource(ByteArrayInputStream.class);
    readOffset = 0;
    presentStream = null;
    inDictionaryStream = null;
    dataStream = null;
    rowGroupOpen = false;
}
Also used : InputStreamSources(com.facebook.presto.orc.stream.InputStreamSources) ByteArrayInputStream(com.facebook.presto.orc.stream.ByteArrayInputStream) RowGroupDictionaryLengthInputStream(com.facebook.presto.orc.stream.RowGroupDictionaryLengthInputStream) BooleanInputStream(com.facebook.presto.orc.stream.BooleanInputStream) LongInputStream(com.facebook.presto.orc.stream.LongInputStream)

Example 7 with InputStreamSources

use of com.facebook.presto.orc.stream.InputStreamSources in project presto by prestodb.

the class SliceDictionaryBatchStreamReader method startStripe.

@Override
public void startStripe(Stripe stripe) {
    InputStreamSources dictionaryStreamSources = stripe.getDictionaryStreamSources();
    stripeDictionaryDataStreamSource = dictionaryStreamSources.getInputStreamSource(streamDescriptor, DICTIONARY_DATA, ByteArrayInputStream.class);
    stripeDictionaryLengthStreamSource = dictionaryStreamSources.getInputStreamSource(streamDescriptor, LENGTH, LongInputStream.class);
    stripeDictionarySize = stripe.getColumnEncodings().get(streamDescriptor.getStreamId()).getColumnEncoding(streamDescriptor.getSequence()).getDictionarySize();
    stripeDictionaryOpen = false;
    presentStreamSource = missingStreamSource(BooleanInputStream.class);
    dataStreamSource = missingStreamSource(LongInputStream.class);
    inDictionaryStreamSource = missingStreamSource(BooleanInputStream.class);
    rowGroupDictionaryLengthStreamSource = missingStreamSource(RowGroupDictionaryLengthInputStream.class);
    rowGroupDictionaryDataStreamSource = missingStreamSource(ByteArrayInputStream.class);
    readOffset = 0;
    nextBatchSize = 0;
    presentStream = null;
    inDictionaryStream = null;
    dataStream = null;
    rowGroupOpen = false;
}
Also used : InputStreamSources(com.facebook.presto.orc.stream.InputStreamSources) ByteArrayInputStream(com.facebook.presto.orc.stream.ByteArrayInputStream) RowGroupDictionaryLengthInputStream(com.facebook.presto.orc.stream.RowGroupDictionaryLengthInputStream) BooleanInputStream(com.facebook.presto.orc.stream.BooleanInputStream) LongInputStream(com.facebook.presto.orc.stream.LongInputStream)

Aggregations

InputStreamSources (com.facebook.presto.orc.stream.InputStreamSources)7 InputStreamSource (com.facebook.presto.orc.stream.InputStreamSource)4 ImmutableMap (com.google.common.collect.ImmutableMap)4 Checkpoints.getDictionaryStreamCheckpoint (com.facebook.presto.orc.checkpoint.Checkpoints.getDictionaryStreamCheckpoint)3 StreamCheckpoint (com.facebook.presto.orc.checkpoint.StreamCheckpoint)3 Stream (com.facebook.presto.orc.metadata.Stream)3 OrcInputStream (com.facebook.presto.orc.stream.OrcInputStream)3 ValueInputStream (com.facebook.presto.orc.stream.ValueInputStream)3 ValueInputStreamSource (com.facebook.presto.orc.stream.ValueInputStreamSource)3 InputStream (java.io.InputStream)3 InvalidCheckpointException (com.facebook.presto.orc.checkpoint.InvalidCheckpointException)2 ColumnEncoding (com.facebook.presto.orc.metadata.ColumnEncoding)2 ColumnEncodingKind (com.facebook.presto.orc.metadata.ColumnEncoding.ColumnEncodingKind)2 DwrfMetadataReader.toStripeEncryptionGroup (com.facebook.presto.orc.metadata.DwrfMetadataReader.toStripeEncryptionGroup)2 OrcTypeKind (com.facebook.presto.orc.metadata.OrcType.OrcTypeKind)2 RowGroupIndex (com.facebook.presto.orc.metadata.RowGroupIndex)2 StripeEncryptionGroup (com.facebook.presto.orc.metadata.StripeEncryptionGroup)2 StripeFooter (com.facebook.presto.orc.metadata.StripeFooter)2 ColumnStatistics (com.facebook.presto.orc.metadata.statistics.ColumnStatistics)2 BooleanInputStream (com.facebook.presto.orc.stream.BooleanInputStream)2