Enum Class ConsolidationFunction
- All Implemented Interfaces:
Serializable,Comparable<ConsolidationFunction>,Constable
DownsampleNode time-series aggregation operator.
Applied within each time bucket to reduce a group of input rows to a single
summary value per column (or a row count for COUNT).
Each constant is named after the aggregate that performs the reduction, and that
name is what the engine resolves: MIN here is the same MIN a
γ computes, over the same values, with the same answer for a bucket whose
values are all NULL. The enum is the operator's vocabulary — what the
grammar admits after USING — not a second definition of what the reduction
does.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionArithmetic mean of numeric column values in the bucket.Number of rows in the bucket; produces a singlecountoutput column.Largest column value in the bucket, by the engine's value order.Smallest column value in the bucket, by the engine's value order.Sum of numeric column values in the bucket. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this reduction is about the rows themselves rather than a column's values, so a bucket yields onecountcolumn and no per-column ones.booleanWhether this reduction is defined only over numbers.static ConsolidationFunctionReturns the enum constant of this class with the specified name.static ConsolidationFunction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVG
Arithmetic mean of numeric column values in the bucket. -
MIN
Smallest column value in the bucket, by the engine's value order. -
MAX
Largest column value in the bucket, by the engine's value order. -
SUM
Sum of numeric column values in the bucket. -
COUNT
Number of rows in the bucket; produces a singlecountoutput column.
-
-
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
-
countsRows
public boolean countsRows()Whether this reduction is about the rows themselves rather than a column's values, so a bucket yields onecountcolumn and no per-column ones.- Returns:
trueforCOUNT
-
numericOnly
public boolean numericOnly()Whether this reduction is defined only over numbers.AVGandSUMarithmetic is;MINandMAXare comparisons, and the engine orders dates, times and strings as readily as numbers — so those two consolidate a column of any scalar type. Both the schema rule and the executor read this rather than each deciding for itself, which is what stops the inferred heading and the produced rows disagreeing.
-