Class MultivalueDedupeBoolean

java.lang.Object
org.elasticsearch.compute.operator.mvdedupe.MultivalueDedupeBoolean

public class MultivalueDedupeBoolean extends Object
Removes duplicate values from multivalued positions.
  • Field Details

  • Constructor Details

    • MultivalueDedupeBoolean

      public MultivalueDedupeBoolean(BooleanBlock block)
  • Method Details

    • dedupeToBlock

      public BooleanBlock dedupeToBlock(BlockFactory blockFactory)
      Dedupe values using an adaptive algorithm based on the size of the input list.
    • sortToBlock

      public BooleanBlock sortToBlock(BlockFactory blockFactory, boolean ascending)
      Sort values from each position and write the results to a Block.
    • hash

      public IntBlock hash(BlockFactory blockFactory, boolean[] everSeen)
      Dedupe values and build a LongBlock suitable for passing as the grouping block to a GroupingAggregatorFunction.
      Parameters:
      everSeen - array tracking if the values false and true are ever seen
    • batchEncoder

      public BatchEncoder batchEncoder(int batchSize)
      Build a BatchEncoder which deduplicates values at each position and then encodes the results into a
      invalid reference
      byte[]
      which can be used for things like hashing many fields together.
    • hashOrd

      public static int hashOrd(boolean[] everSeen, boolean b)
      Convert the boolean to an ordinal and track if it's been seen in everSeen.