Package io.trino.parquet.reader.decoders
Class DeltaBinaryPackedDecoders.DeltaBinaryPackedByteDecoder
java.lang.Object
io.trino.parquet.reader.decoders.DeltaBinaryPackedDecoders.DeltaBinaryPackedByteDecoder
- All Implemented Interfaces:
ValueDecoder<byte[]>
- Enclosing class:
- DeltaBinaryPackedDecoders
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.parquet.reader.decoders.ValueDecoder
ValueDecoder.EmptyValueDecoder<T>, ValueDecoder.LevelsDecoderProvider, ValueDecoder.ValueDecodersProvider<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]createMiniBlockBuffer(int size) intvoidinit(SimpleSliceInputStream input) voidread(byte[] values, int offset, int length) voidreadInternal(byte[] values, int offset, int length) protected voidsetValue(byte[] values, int offset, long value) voidskip(int n) protected longunpack(byte[] output, int outputOffset, int length, SimpleSliceInputStream input, long minDelta, byte bitWidth) This method needs to do two things: Set output[outputOffset-1] to 'previousValue'.
-
Constructor Details
-
DeltaBinaryPackedByteDecoder
public DeltaBinaryPackedByteDecoder()
-
-
Method Details
-
createMiniBlockBuffer
protected byte[] createMiniBlockBuffer(int size) -
setValue
protected void setValue(byte[] values, int offset, long value) -
read
public void read(byte[] values, int offset, int length) -
unpack
protected long unpack(byte[] output, int outputOffset, int length, SimpleSliceInputStream input, long minDelta, byte bitWidth) This method needs to do two things:- Set output[outputOffset-1] to 'previousValue'. This way the inner loops are consistent and can handle iterations in batches of 32. This is needed since some values might have been skipped
- Delegate unpacking to the corresponding static method from DeltaPackingUtils class
- Returns:
- Last value read
-
init
- Specified by:
initin interfaceValueDecoder<ValuesType>
-
readInternal
public void readInternal(byte[] values, int offset, int length) -
getValueCount
public int getValueCount() -
skip
public void skip(int n) - Specified by:
skipin interfaceValueDecoder<ValuesType>
-