Class GroupKeyEncoder

java.lang.Object
org.elasticsearch.compute.operator.GroupKeyEncoder
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable, org.elasticsearch.core.Releasable

public class GroupKeyEncoder extends Object implements org.apache.lucene.util.Accountable, org.elasticsearch.core.Releasable
Encodes the values at a given position across multiple blocks into a single BytesRef composite key. Multivalued positions are serialized with list semantics: the value count is written first, then each value in block iteration order. This means [1, 2] and [2, 1] produce different keys. Null positions are encoded as a value count of zero.
  • Constructor Details

  • Method Details

    • encode

      public org.apache.lucene.util.BytesRef encode(Page page, int position)
      Encode the group key for the given position from the page into a BytesRef. The returned reference is only valid until the next call to encode.
    • groupChannels

      public int[] groupChannels()
    • ramBytesUsed

      public long ramBytesUsed()
      Specified by:
      ramBytesUsed in interface org.apache.lucene.util.Accountable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.core.Releasable