Class VarcharApproximateMostFrequent
- java.lang.Object
-
- io.prestosql.operator.aggregation.VarcharApproximateMostFrequent
-
public final class VarcharApproximateMostFrequent extends Object
Aggregation function that approximates the frequency of the top-K elements. This function keeps counts for a "frequent" subset of elements and assumes all other elements once fewer than the least-frequent "frequent" element.
The algorithm is based loosely on: Efficient Computation of Frequent and Top-*k* Elements in Data Streams by Ahmed Metwally, Divyakant Agrawal, and Amr El Abbadi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VarcharApproximateMostFrequent.State
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
combine(VarcharApproximateMostFrequent.State state, VarcharApproximateMostFrequent.State otherState)
static void
input(VarcharApproximateMostFrequent.State state, long buckets, io.airlift.slice.Slice value, long capacity)
static void
output(VarcharApproximateMostFrequent.State state, BlockBuilder out)
-
-
-
Method Detail
-
input
public static void input(VarcharApproximateMostFrequent.State state, long buckets, io.airlift.slice.Slice value, long capacity)
-
combine
public static void combine(VarcharApproximateMostFrequent.State state, VarcharApproximateMostFrequent.State otherState)
-
output
public static void output(VarcharApproximateMostFrequent.State state, BlockBuilder out)
-
-