Is your feature request related to a problem or challenge?
approx_distinct / HyperLogLog hardcodes precision at p=14 (16384 registers, 16 KiB per sketch). There is currently no way for callers to trade accuracy for lower memory or smaller partial-aggregate state on the wire.
Describe the solution you'd like
Request is to add HyperLogLog::with_precision(p) and ApproxDistinct::with_hll_precision(p) so that integrators can request a smaller sketch (e.g. p=12 → 4 KiB, ~1.6% error) without changing the default behaviour.
Note: This does not affects non-approx paths which use bitmap for exact distinct count.
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem or challenge?
approx_distinct/HyperLogLoghardcodes precision atp=14(16384 registers, 16 KiB per sketch). There is currently no way for callers to trade accuracy for lower memory or smaller partial-aggregate state on the wire.Describe the solution you'd like
Request is to add
HyperLogLog::with_precision(p)andApproxDistinct::with_hll_precision(p)so that integrators can request a smaller sketch (e.g. p=12 → 4 KiB, ~1.6% error) without changing the default behaviour.Note: This does not affects non-approx paths which use bitmap for exact distinct count.
Describe alternatives you've considered
No response
Additional context
No response