java.lang.Object
org.elasticsearch.index.codec.tsdb.pipeline.numeric.NumericBlockDecoder

public final class NumericBlockDecoder extends Object
Per-field block decoder owning a mutable DecodingContext.

A single instance decodes all blocks for one field. The context holds per-block mutable state (stage bitmap, metadata buffer, data input reference) that is cleared via DecodingContext.clear() at the start of each block and reused for the next. This zero-allocation-per-block design avoids GC pressure on the decode hot path, but makes the instance NOT thread-safe: concurrent callers must each obtain their own instance via NumericDecoder.newBlockDecoder().

  • Method Details

    • decode

      public void decode(long[] values, int count, org.apache.lucene.store.DataInput in) throws IOException
      Decodes a block of values by reading the payload and reversing transforms.
      Parameters:
      values - the output array to populate
      count - the expected number of values
      in - the data input to read from
      Throws:
      IOException - if an I/O error occurs
    • blockSize

      public int blockSize()
      Returns the number of values per block.
      Returns:
      the number of values per block