Class DeltaBinaryPackedDecoders.DeltaBinaryPackedShortDecoder

java.lang.Object
io.trino.parquet.reader.decoders.DeltaBinaryPackedDecoders.DeltaBinaryPackedShortDecoder
All Implemented Interfaces:
ValueDecoder<short[]>
Enclosing class:
DeltaBinaryPackedDecoders

public static class DeltaBinaryPackedDecoders.DeltaBinaryPackedShortDecoder extends Object
  • Constructor Details

    • DeltaBinaryPackedShortDecoder

      public DeltaBinaryPackedShortDecoder()
  • Method Details

    • createMiniBlockBuffer

      protected short[] createMiniBlockBuffer(int size)
    • setValue

      protected void setValue(short[] values, int offset, long value)
    • read

      public void read(short[] values, int offset, int length)
    • unpack

      protected long unpack(short[] 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

      public void init(SimpleSliceInputStream input)
      Specified by:
      init in interface ValueDecoder<ValuesType>
    • readInternal

      public void readInternal(short[] values, int offset, int length)
    • getValueCount

      public int getValueCount()
    • skip

      public void skip(int n)
      Specified by:
      skip in interface ValueDecoder<ValuesType>