HLL_TO_BASE64
hll_to_base64β
descriptionβ
Syntaxβ
VARCHAR HLL_TO_BASE64(HLL input)
Convert an input hll to a base64 string. If input is NULL, return NULL.
exampleβ
mysql> select hll_to_base64(NULL);
+---------------------+
| hll_to_base64(NULL) |
+---------------------+
| NULL |
+---------------------+
1 row in set (0.00 sec)
mysql> select hll_to_base64(hll_empty());
+----------------------------+
| hll_to_base64(hll_empty()) |
+----------------------------+
| AA== |
+----------------------------+
1 row in set (0.02 sec)
mysql> select hll_to_base64(hll_hash('abc'));
+--------------------------------+
| hll_to_base64(hll_hash('abc')) |
+--------------------------------+
| AQEC5XSzrpDsdw== |
+--------------------------------+
1 row in set (0.03 sec)
mysql> 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 |
+---------------------------------------------------+-------------------+
1 row in set (0.04 sec)
mysql> select hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc'))));
+------------------------------------------------------------------+
| hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc')))) |
+------------------------------------------------------------------+
| 1 |
+------------------------------------------------------------------+
1 row in set (0.04 sec)
keywordsβ
HLL_TO_BASE64, HLL