Interface GroupingAggregatorFunction.AddInput

All Superinterfaces:
AutoCloseable, Closeable, org.elasticsearch.core.Releasable
Enclosing interface:
GroupingAggregatorFunction

public static interface GroupingAggregatorFunction.AddInput extends org.elasticsearch.core.Releasable
Consume group ids to cause the GroupingAggregatorFunction to group values at a particular position into a particular group.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int positionOffset, IntArrayBlock groupIds)
    Implementation of add(int, IntBlock) for a specific type of block.
    void
    add(int positionOffset, IntBigArrayBlock groupIds)
    Implementation of add(int, IntBlock) for a specific type of block.
    default void
    add(int positionOffset, IntBlock groupIds)
    Send a batch of group ids to the aggregator.
    void
    add(int positionOffset, IntVector groupIds)
    Send a batch of group ids to the aggregator.

    Methods inherited from interface org.elasticsearch.core.Releasable

    close
  • Method Details

    • add

      default void add(int positionOffset, IntBlock groupIds)
      Send a batch of group ids to the aggregator. The groupIds may be offset from the start of the block to allow for sending chunks of group ids.

      Any single position may be collected into arbitrarily many group ids. Often it's just one, but it's quite possible for a single position to be collected into thousands or millions of group ids. The positionOffset controls the start of the chunk of group ids contained in groupIds.

      It is possible for an input position to be cut into more than one chunk. In other words, it's possible for this method to be called multiple times with the same positionOffset and a groupIds Block that contains thousands of values at a single positions.

      Finally, it's possible for a single position to be collected into groupIds. In that case it's positionOffset may be skipped entirely or the groupIds block could contain a null value at that position.

      This method delegates the processing to the other overloads for specific groupIds block types.

      Parameters:
      positionOffset - offset into the Page used to build this GroupingAggregatorFunction.AddInput of these ids
      groupIds - Block of group id, some of which may be null or multivalued
    • add

      void add(int positionOffset, IntArrayBlock groupIds)
      Implementation of add(int, IntBlock) for a specific type of block.
    • add

      void add(int positionOffset, IntBigArrayBlock groupIds)
      Implementation of add(int, IntBlock) for a specific type of block.
    • add

      void add(int positionOffset, IntVector groupIds)
      Send a batch of group ids to the aggregator. The groupIds may be offset from the start of the block to allow for sending chunks of group ids.

      See add(int, IntBlock) for discussion on the offset. This method can only be called with blocks contained in a Vector which only allows a single value per position.

      Parameters:
      positionOffset - offset into the Page used to build this GroupingAggregatorFunction.AddInput of these ids
      groupIds - Vector of group id, some of which may be null or multivalued