FrequentLongsSketch
This section contains reference documentation for the FREQUENTLONGSSKETCH function.
FREQUENTLONGSSKETCH
is an estimation data-sketch function which can be used to estimate the frequency of an item. It is based on Apache Datasketches library and returns a serialized sketch object which can be merged with other sketches.
Signature
FREQUENTLONGSSKETCH(column, maxMapSize=256) -> Base64 encoded sketch object
column
(required): Name of the column to aggregate on. Needs to be a type which can be cast into 'LONG'.maxMapSize
: This value specifies the maximum physical length of the internal hash map. The maxMapSize must be a power of 2 and the default value is 256.
Usage Example
Which can be used, for example in Java as:
For more examples on the sketch API, refer to the Datasketches documentation.
Last updated