Algebird's HyperLogLog support for Facebook Presto (prestodb.io).
There are two types of functions, aggregation and scalar.
merge(<hll: HLL>)
-> HLL
create_hll(<element:VARCHAR>, <bits: BIGINT>)
-> HLL
cardinality(<hll: HLL>)
-> BIGINT
Running mvn clean package
will generate a jar
file as well as a zip
file
containing this plugin along with all of its dependencies.
cd /usr/lib/presto/plugin
curl -sLO https://github.com/robotblake/presto-hyperloglog/releases/download/$PRESTO_VERSION/presto-hyperloglog-$PRESTO_VERSION.zip
unzip presto-hyperloglog-$PRESTO_VERSION.zip
rm presto-hyperloglog-$PRESTO_VERSION.zip