private static ValueInputStream<?> createLongStream( OrcInputStream inputStream, ColumnEncodingKind encoding, OrcTypeKind type, boolean signed, boolean usesVInt) { if (encoding == DIRECT_V2 || encoding == DICTIONARY_V2) { return new LongInputStreamV2(inputStream, signed, false); } else if (encoding == DIRECT || encoding == DICTIONARY) { return new LongInputStreamV1(inputStream, signed); } else if (encoding == DWRF_DIRECT) { return new LongInputStreamDwrf(inputStream, type, signed, usesVInt); } else { throw new IllegalArgumentException("Unsupported encoding for long stream: " + encoding); } } }
@Override protected LongInputStreamV2 createValueStream(Slice slice) throws OrcCorruptionException { Optional<OrcDecompressor> orcDecompressor = createOrcDecompressor(ORC_DATA_SOURCE_ID, SNAPPY, COMPRESSION_BLOCK_SIZE); OrcInputStream input = new OrcInputStream(ORC_DATA_SOURCE_ID, slice.getInput(), orcDecompressor, newSimpleAggregatedMemoryContext(), slice.getRetainedSize()); return new LongInputStreamV2(input, true, false); }
private static ValueInputStream<?> createLongStream( OrcInputStream inputStream, ColumnEncodingKind encoding, OrcTypeKind type, boolean signed, boolean usesVInt) { if (encoding == DIRECT_V2 || encoding == DICTIONARY_V2) { return new LongInputStreamV2(inputStream, signed, false); } else if (encoding == DIRECT || encoding == DICTIONARY) { return new LongInputStreamV1(inputStream, signed); } else if (encoding == DWRF_DIRECT) { return new LongInputStreamDwrf(inputStream, type, signed, usesVInt); } else { throw new IllegalArgumentException("Unsupported encoding for long stream: " + encoding); } } }
@Override protected LongInputStreamV2 createValueStream(Slice slice) throws OrcCorruptionException { Optional<OrcDecompressor> orcDecompressor = createOrcDecompressor(ORC_DATA_SOURCE_ID, SNAPPY, COMPRESSION_BLOCK_SIZE); OrcInputStream input = new OrcInputStream(ORC_DATA_SOURCE_ID, slice.getInput(), orcDecompressor, newSimpleAggregatedMemoryContext(), slice.getRetainedSize()); return new LongInputStreamV2(input, true, false); }