Class WithinSeriesAggregate

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, PromqlPlan

public final class WithinSeriesAggregate extends PromqlFunctionCall
Represents a PromQL aggregate function call that operates on range vectors.

These functions take a range vector as input and aggregate the values within each series over the specified time range, returning an instant vector. This corresponds to PromQL syntax:

 function_name(range_vector)
 
Examples:
 rate(http_requests_total[5m])
 increase(errors_total[1h])
 delta(cpu_temp_celsius[30m])
 
These functions operate independently on each time series selected by the range vector. The result contains one sample per series at the evaluation timestamp.
  • Constructor Details

  • Method Details

    • info

      protected NodeInfo<PromqlFunctionCall> info()
      Description copied from class: Node
      Normally, you want to use one of the static create methods to implement this.

      For QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations like QueryPlan#transformExpressionsOnly(Function) will not have an effect.

      Specified by:
      info in class Node<LogicalPlan>
    • replaceChild

      public WithinSeriesAggregate replaceChild(LogicalPlan newChild)
      Specified by:
      replaceChild in class UnaryPlan
    • output

      public List<Attribute> output()
      Description copied from class: QueryPlan
      The ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results.
      Specified by:
      output in interface PromqlPlan
      Overrides:
      output in class PromqlFunctionCall
    • functionType

      public FunctionType functionType()
      Specified by:
      functionType in class PromqlFunctionCall