Enum Class PromqlDataType

java.lang.Object
java.lang.Enum<PromqlDataType>
org.elasticsearch.xpack.esql.plan.logical.promql.PromqlDataType
All Implemented Interfaces:
Serializable, Comparable<PromqlDataType>, Constable

public enum PromqlDataType extends Enum<PromqlDataType>
PromQL data types representing the possible return types of PromQL queries.
  • Enum Constant Details

    • INSTANT_VECTOR

      public static final PromqlDataType INSTANT_VECTOR
      An instant vector is a set of time series containing a single sample for each time series, all sharing the same timestamp. Example:
       http_requests_total{job="api-server"} 1027
       http_requests_total{job="frontend"} 314
       
      An instant vector is typically created by evaluating an instant selector:
       http_requests_total
       
      Or by applying a within series aggregation over a range vector:
       rate(http_requests_total[5m])
       
    • RANGE_VECTOR

      public static final PromqlDataType RANGE_VECTOR
      A range vector is a set of time series containing a range of data points over time for each time series. Example:
       http_requests_total{job="api-server"} [1020, 1023, 1027]
       http_requests_total{job="frontend"} [310, 312, 314]
       
      A range vector is typically created by evaluating a range selector:
       http_requests_total[5m]
       
      Or by a subquery over an instant vector:
       http_requests_total[1m:10s]
       
    • SCALAR

      public static final PromqlDataType SCALAR
      A scalar is a simple numeric floating point value. Example:
       42.0
       
      A scalar is typically created by evaluating a scalar literal:
       42
       
      Or by calling a function that returns a scalar:
       pi()
       
      Or by converting an instant vector with a single element to a scalar.
       scalar(http_requests_total{job="api-server"})
       
  • Method Details

    • values

      public static PromqlDataType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PromqlDataType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<PromqlDataType>