citusdata / postgresql-hll

PostgreSQL extension adding HyperLogLog data structures as a native data type
http://blog.aggregateknowledge.com/2013/02/04/open-source-release-postgresql-hll/
Apache License 2.0
1.13k stars 116 forks source link

add hll_cardinality_agg() #22

Open jberkus opened 10 years ago

jberkus commented 10 years ago

I think this wrapper function should be part of the standard HLL library, for doing ad-hoc cardinality estimates. It would be a wrapper for:

hll_cardinality(hll_add_agg(hll_hash_any(VALUE)))

ghost commented 10 years ago

Sounds good! I'm happy to accept a pull request for it.