Enum Class FunctionType
- All Implemented Interfaces:
Serializable,Comparable<FunctionType>,Constable
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 native histogram data types.Manipulates or queries the label set of time series.Produces a scalar value.Converts a vector that contains only a single element to a scalar.Extracts or computes time-based values from timestamps.Transforms each sample in a vector independently (element-wise operations).Converts a scalar to a vector.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 native histogram data types.Input: Instant vector (histogram samples)
Output: Instant vector or scalarExamples: histogram_quantile(), histogram_avg(), histogram_count(), histogram_sum()
-
VECTOR_CONVERSION
Converts a scalar to a vector.Input: Scalar
Output: Instant vector (single sample with no labels)Example:
vector(42)produces an instant vector with one sample with value42 -
SCALAR_CONVERSION
Converts a vector that contains only a single element to a scalar. If the vector does not contain exactly one element,NaNis returned.Input: Instant vector (single sample)
Output: ScalarExample:
scalar(vector(42))produces42 -
SCALAR
Produces a scalar value.Input: None
Output: ScalarExamples:
pi(),time()
-
-
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. -
outputType
-
inputType
-