Class TimeSeriesGroupingAggregatorEvaluationContext

java.lang.Object
org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext
org.elasticsearch.compute.aggregation.TimeSeriesGroupingAggregatorEvaluationContext

public abstract class TimeSeriesGroupingAggregatorEvaluationContext extends GroupingAggregatorEvaluationContext
  • Constructor Details

    • TimeSeriesGroupingAggregatorEvaluationContext

      public TimeSeriesGroupingAggregatorEvaluationContext(DriverContext driverContext)
  • Method Details

    • rangeStartInMillis

      public abstract long rangeStartInMillis(int groupId)
      Returns the inclusive start of the time range, in milliseconds, for the specified group ID. Data points for this group are within the range [rangeStartInMillis, rangeEndInMillis).
      Parameters:
      groupId - the group id
      Returns:
      the start of the time range in milliseconds (inclusive)
    • rangeEndInMillis

      public abstract long rangeEndInMillis(int groupId)
      Returns the exclusive end of the time range, in milliseconds, for the specified group ID. Data points for this group are within the range [rangeStartInMillis, rangeEndInMillis).
    • groupIdsFromWindow

      public abstract List<Integer> groupIdsFromWindow(int startingGroupId, Duration window)
      Returns the group IDs of subsequent groups that belong to the window starting with the startingGroupId. The time ranges of returned group IDs are within the interval [rangeStartInMillis(startingGroupId), rangeStartInMillis(startingGroupId) + window.toMillis()).
      Parameters:
      startingGroupId - the starting group ID
      window - the window duration
      Returns:
      a list of group IDs within the window