Class WithinSeriesAggregate

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable

public class WithinSeriesAggregate extends PromqlFunctionCall
Represents a PromQL aggregate function call that operates on range vectors. This is a surrogate logical plan for PromQL range vector functions that translate to ESQL TimeSeriesAggregate operations. It extends PromqlFunctionCall and implements the surrogate pattern to transform PromQL aggregations into ESQL time-series aggregates. Range vector functions supported: - Counter functions: rate(), irate(), increase(), delta(), idelta() - Aggregation functions: avg_over_time(), sum_over_time(), min_over_time(), max_over_time(), count_over_time() - Selection functions: first_over_time(), last_over_time() - Presence functions: present_over_time(), absent_over_time() - Cardinality functions: count_distinct_over_time() During planning, surrogate() transforms this node into: TimeSeriesAggregate( child: RangeSelector (or other time-series source), groupings: [_tsid], aggregates: [function_result, _tsid] ) Example transformations: rate(http_requests[5m]) → TimeSeriesAggregate(groupBy: _tsid, agg: Rate(value, @timestamp)) avg_over_time(cpu_usage[1h]) → TimeSeriesAggregate(groupBy: _tsid, agg: AvgOverTime(value))