@Experimental public enum ReduceFunction extends Enum<ReduceFunction> implements ProtocolKeyword
| Enum Constant and Description |
|---|
AVG
Calculate the average of numeric values.
|
COUNT
Count the number of records in the group.
|
COUNT_DISTINCT
Count unique values of a field.
|
COUNT_DISTINCTISH
Approximate count of unique values using HyperLogLog algorithm.
|
FIRST_VALUE
Get the first value in the group.
|
MAX
Find the maximum value.
|
MIN
Find the minimum value.
|
QUANTILE
Calculate quantile/percentile (e.g., median at 0.5).
|
RANDOM_SAMPLE
Random sampling from the group.
|
STDDEV
Calculate standard deviation.
|
SUM
Sum all numeric values of a field.
|
TOLIST
Collect all values into a list.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes() |
static ReduceFunction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReduceFunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, toString, wait, wait, waitname, toStringpublic static final ReduceFunction COUNT
public static final ReduceFunction COUNT_DISTINCT
public static final ReduceFunction COUNT_DISTINCTISH
public static final ReduceFunction SUM
public static final ReduceFunction AVG
public static final ReduceFunction MIN
public static final ReduceFunction MAX
public static final ReduceFunction STDDEV
public static final ReduceFunction QUANTILE
public static final ReduceFunction TOLIST
public static final ReduceFunction FIRST_VALUE
public static final ReduceFunction RANDOM_SAMPLE
public static ReduceFunction[] values()
for (ReduceFunction c : ReduceFunction.values()) System.out.println(c);
public static ReduceFunction valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic byte[] getBytes()
getBytes in interface ProtocolKeywordCopyright © 2026 lettuce.io. All rights reserved.