Interface AggregatorFunction

All Superinterfaces:
AutoCloseable, Closeable, org.elasticsearch.core.Releasable
All Known Implementing Classes:
CountAggregatorFunction, FromPartialAggregatorFunction, ToPartialAggregatorFunction

public interface AggregatorFunction extends org.elasticsearch.core.Releasable
A non-grouped aggregation.
  • Method Details

    • addRawInput

      void addRawInput(Page page, BooleanVector mask)
      Add a page worth of data to the aggregation.
      Parameters:
      mask - a mask to apply to the positions. If the position is false then the aggregation should skip it.
    • addIntermediateInput

      void addIntermediateInput(Page page)
      Add a pre-aggregated page worth of "intermediate" input. This intermediate input will have been created by calling evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.operator.DriverContext) on this agg, though likely in a different Driver and maybe on a different physical node.
    • evaluateIntermediate

      void evaluateIntermediate(Block[] blocks, int offset, DriverContext driverContext)
      Build pre-aggregated "intermediate" data to pass to the addIntermediateInput(org.elasticsearch.compute.data.Page).
      Parameters:
      blocks - write the output into this array
      offset - write the first Block at this offset in blocks
    • evaluateFinal

      void evaluateFinal(Block[] blocks, int offset, DriverContext driverContext)
      Build the final results from running this agg.
      Parameters:
      blocks - write the output into this array
      offset - write the first Block at this offset in blocks
    • intermediateBlockCount

      int intermediateBlockCount()
      The number of blocks used by intermediate state.