HLL_COMBINE
functionsupportedCore SQL functionsCombines (merges) input states into a single output state. This allows scenarios where HLL_ACCUMULATE is run over horizontal partitions of the same table, producing an algorithm state for each table partition. These states can later be combined using HLL_COMBINE, producing the same output state as a single run of HLL_ACCUMULATE over the entire table.
Syntax
supportedpartialnot supportednot scored
Aggregate function
HLL_COMBINE( [ DISTINCT ] <state> )
Window function
HLL_COMBINE( [ DISTINCT ] <state> ) OVER ( [ PARTITION BY <expr1> ] )
Parameters
| Name | Required | Description |
|---|---|---|
state | required | An expression that contains state information generated by a call to HLL_ACCUMULATE. |
Usage notes
- This function can be used as an aggregate function or a window function.
- DISTINCT is supported syntactically, but has no effect.
- The output of this function is not fully deterministic. Running this function on the same inputs might return different results at different times. The differences are typically small and are consistent with the fact that the HLL_* functions are approximation functions.