title | description | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|
hll_merge() |
Learn how to use the hll_merge() function toe merge HLL results. |
alexans |
reference |
12/28/2022 |
Merges HLL results. This is the scalar version of the aggregate version hll_merge()
.
Read about the underlying algorithm (HyperLogLog) and estimation accuracy.
Important
The results of hll(), hll_if(), and hll_merge() can be stored and later retrieved. For example, you may want to create a daily unique users summary, which can then be used to calculate weekly counts. However, the precise binary representation of these results may change over time. There's no guarantee that these functions will produce identical results for identical inputs, and therefore we don't advise relying on them.
hll_merge(
hll,
hll2,
[ hll3,
... ])
[!INCLUDE syntax-conventions-note]
Name | Type | Required | Description |
---|---|---|---|
hll, hll2, ... | string |
✔️ | The column names containing HLL values to merge. The function expects between 2-64 arguments. |
Returns one HLL value. The value is the result of merging the columns hll, hll2, ... hllN.
This example shows the value of the merged columns.
[!div class="nextstepaction"] Run the query
range x from 1 to 10 step 1
| extend y = x + 10
| summarize hll_x = hll(x), hll_y = hll(y)
| project merged = hll_merge(hll_x, hll_y)
| project dcount_hll(merged)
Output
dcount_hll_merged |
---|
20 |
[!INCLUDE data-explorer-estimation-accuracy]