Class NullsDecoder

java.lang.Object
io.trino.parquet.reader.flat.NullsDecoder
All Implemented Interfaces:
FlatDefinitionLevelDecoder

public class NullsDecoder extends Object implements FlatDefinitionLevelDecoder
The hybrid RLE/bit-packing encoding consists of multiple groups. Each group is either encoded as RLE or bit-packed

For a primitive column, the definition level is always either 0 (null) or 1 (non-null). Therefore, every value is decoded from a single bit and stored into a boolean array which stores false for non-null and true for null.

  • Constructor Details

    • NullsDecoder

      public NullsDecoder()
  • Method Details

    • init

      public void init(io.airlift.slice.Slice input)
      Specified by:
      init in interface FlatDefinitionLevelDecoder
    • readNext

      public int readNext(boolean[] values, int offset, int length)
      'values' array needs to be empty, i.e. contain only false values.
      Specified by:
      readNext in interface FlatDefinitionLevelDecoder
    • skip

      public int skip(int length)
      Skip 'length' values and return the number of non-nulls encountered
      Specified by:
      skip in interface FlatDefinitionLevelDecoder