4 ms·
What part of the algorithm would cause the number to change significantly every time you run the query?
by sammoth 11y ago
What part of the algorithm would cause the number to change significantly every time you run the query?
- BenoitP 11y agoAll shards compute their own, and send the result in a non deterministic order. My explanation is that the merge part of HLL depends on the order. Line 95 of this method [1] from this implementation [2] shows a max(mask(x), mask(y)), which is not associative but is a close proxy to max()(which is associative). [1] https://github.com/addthis/stream-lib/blob/af045cb4199959c07fb4422e605573e180491191/src/main/java/com/clearspring/analytics/stream/cardinality/RegisterSet.java#L87 https://github.com/addthis/stream-lib/blob/af045cb4199959c07... [2] https://github.com/addthis/stream-lib/blob/master/src/main/java/com/clearspring/analytics/stream/cardinality/HyperLogLog.java https://github.com/addthis/stream-lib/blob/master/src/main/j...