hll-to-base64
根据您提供的规范,我将重新整理文档:
{ "title": "HLL_TO_BASE64", "language": "en" }
Description
Converts an input HLL to a base64-encoded string. If the input is <null>
, the function returns <null>
.
Syntax
HLL_TO_BASE64(<hll_input>)
Parameters
Parameter | Description |
---|---|
<hll_input> | The HyperLogLog (HLL) data to be converted to a base64-encoded string. If the input is <null> , the function returns <null> . |
Examples
select hll_to_base64(NULL);
+---------------------+
| hll_to_base64(NULL) |
+---------------------+
| NULL |
+---------------------+
select hll_to_base64(hll_empty());
+----------------------------+
| hll_to_base64(hll_empty()) |
+----------------------------+
| AA== |
+----------------------------+
select hll_to_base64(hll_hash('abc'));
+--------------------------------+
| hll_to_base64(hll_hash('abc')) |
+--------------------------------+
| AQEC5XSzrpDsdw== |
+--------------------------------+
select hll_union_agg(hll_from_base64(hll_to_base64(pv))), hll_union_agg(pv) from test_hll;
+---------------------------------------------------+-------------------+
| hll_union_agg(hll_from_base64(hll_to_base64(pv))) | hll_union_agg(pv) |
+---------------------------------------------------+-------------------+
| 3 | 3 |
+---------------------------------------------------+-------------------+
select hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc'))));
+------------------------------------------------------------------+
| hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc')))) |
+------------------------------------------------------------------+
| 1 |
+------------------------------------------------------------------+