Class ValueTransformationFunction

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, PromqlPlan

public final class ValueTransformationFunction extends PromqlFunctionCall
Represents a PromQL function call that performs element-wise transformations on an instant vector.

These functions transform each sample in the input instant vector independently, preserving the labels. The result is an instant vector with the same cardinality as the input, containing the transformed values. This corresponds to PromQL syntax:

 function_name(instant_vector)
 
Examples:
 abs(http_requests_total)
 ceil(cpu_usage)
 sqrt(variance)
 
These functions operate on the value of each time series without changing the set of series or their labels.
  • 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 ValueTransformationFunction 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