Enum Class FunctionType
- All Implemented Interfaces:
Serializable,Comparable<FunctionType>,Constable
Classifies PromQL functions by their input vector type and aggregation behavior.
This classification is independent of how the function is transformed to ESQL.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAggregates data across multiple time series at a single point in time.Operates on histogram data types.Manipulates or queries the label set of time series.Special functions that don't fit standard patterns.Extracts or computes time-based values from timestamps.Transforms each sample in a vector independently (element-wise operations).Aggregates data within each time series over a time window. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this function performs aggregation.booleanReturns whether this function transforms values element-wise.booleanReturns whether this function operates on instant vectors.booleanReturns whether this function operates on range vectors.static FunctionTypeReturns the enum constant of this class with the specified name.static FunctionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WITHIN_SERIES_AGGREGATION
Aggregates data within each time series over a time window. Input: Range vector (multiple samples per series over time range) Output: Instant vector (one aggregated value per series) Grouping: Implicit by time series (_tsid) Examples: - Rate functions: rate(), irate(), increase(), delta(), idelta() - Aggregations: avg_over_time(), sum_over_time(), max_over_time(), min_over_time(), count_over_time() - Selection: first_over_time(), last_over_time() - Presence: present_over_time(), absent_over_time() -
ACROSS_SERIES_AGGREGATION
Aggregates data across multiple time series at a single point in time. Input: Instant vector (one sample per series at evaluation time) Output: Instant vector (aggregated across series) Grouping: Explicit by labels (by/without) Examples: - Basic: sum(), avg(), max(), min(), count() - Statistical: stddev(), stdvar(), quantile() - Top-k: topk(), bottomk() - Grouping: group(), count_values() -
VALUE_TRANSFORMATION
Transforms each sample in a vector independently (element-wise operations). Input: Instant vector Output: Instant vector (same cardinality, transformed values) Examples: - Math: abs(), ceil(), floor(), round(), sqrt(), exp(), ln(), log2(), log10() - Trigonometric: sin(), cos(), tan(), asin(), acos(), atan(), sinh(), cosh(), tanh() - Clamping: clamp(), clamp_max(), clamp_min() - Sign: sgn() -
METADATA_MANIPULATION
Manipulates or queries the label set of time series. Input: Instant vector Output: Instant vector (modified labels or label-based filtering) Examples: - Manipulation: label_replace(), label_join() - Querying: absent() -
TIME_EXTRACTION
Extracts or computes time-based values from timestamps. Input: Instant vector Output: Instant vector (timestamp replaced with time component) Examples: day_of_month(), day_of_week(), hour(), minute(), month(), year(), timestamp() -
HISTOGRAM
Operates on histogram data types. Input: Instant vector (histogram samples) Output: Instant vector or scalar Examples: histogram_quantile(), histogram_avg(), histogram_count(), histogram_sum() -
SPECIAL
Special functions that don't fit standard patterns. Examples: - vector() - converts scalar to vector - scalar() - converts single-element vector to scalar - time() - current timestamp as scalar - pi() - mathematical constant
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
isRangeVector
public boolean isRangeVector()Returns whether this function operates on range vectors. -
isInstantVector
public boolean isInstantVector()Returns whether this function operates on instant vectors. -
isAggregation
public boolean isAggregation()Returns whether this function performs aggregation. -
isElementWise
public boolean isElementWise()Returns whether this function transforms values element-wise.
-