The hll module introduces a HyperLogLog data structure, a fixed-size, set-like structure used for estimating the count of distinct values with tunable precision. It uses a promotion hierarchy of algorithms to balance accuracy, memory, and performance:
EMPTY: A constant representing an empty set.EXPLICIT: A sorted list of unique integers (exact representation) maintained up to a fixed cardinality.SPARSE: A map-based probabilistic implementation that stores only non-zero registers.FULL: A fully-materialized, list-based implementation storing every register.
Cardinality estimates for EMPTY and EXPLICIT are exact, while SPARSE and FULL provide probabilistic guarantees.