Documentation Index
Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
Use this file to discover all available pages before exploring further.
Extracts a cardinality estimate of a single HLL++ sketch that was previously built using the aggregate
function HLL_COUNT_BUILD.
Syntax
HLL_COUNT_ESTIMATE(<expression>)
Parameters
| Parameter | Description | Supported input types |
|---|
<expression> | An HLL++ sketch produced by the HLL_COUNT_BUILD function. | BYTEA |
Return Type
BIGINT
Example
Following the example in HLL_COUNT_BUILD:
SELECT hll_count_estimate(a) AS hll_estimate
FROM sketch_of_data_to_count
ORDER BY 1;
| hll_estimate (BIGINT) |
|---|
| 3291008 |
| 4948957 |
SELECT hll_count_estimate(hll_count_merge(a)) AS hll_estimate
FROM sketch_of_data_to_count;
| hll_estimate (BIGINT) |
|---|
| 6606880 |