Skip to content

Commit 360ca27

Browse files
committed
Remove mergeHyperLogLog.
It's buggy. If somebody needs this later, they'll need to put back a non-buggy vesion of it. Discussion: CAM3SWZT-i6R9JU5YXa8MJUou2_r3LfGJZpQ9tYa1BYxfkj0=cQ@mail.gmail.com Discussion: CAM3SWZRUOLsYoTT83QgdUy9D8ehYWm_nvbrrfcOOzikiRfFY7g@mail.gmail.com Peter Geoghegan
1 parent 59eb551 commit 360ca27

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/backend/lib/hyperloglog.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -220,28 +220,6 @@ estimateHyperLogLog(hyperLogLogState *cState)
220220
return result;
221221
}
222222

223-
/*
224-
* Merges the estimate from one HyperLogLog state to another, returning the
225-
* estimate of their union.
226-
*
227-
* The number of registers in each must match.
228-
*/
229-
void
230-
mergeHyperLogLog(hyperLogLogState *cState, const hyperLogLogState *oState)
231-
{
232-
int r;
233-
234-
if (cState->nRegisters != oState->nRegisters)
235-
elog(ERROR, "number of registers mismatch: %zu != %zu",
236-
cState->nRegisters, oState->nRegisters);
237-
238-
for (r = 0; r < cState->nRegisters; ++r)
239-
{
240-
cState->hashesArr[r] = Max(cState->hashesArr[r], oState->hashesArr[r]);
241-
}
242-
}
243-
244-
245223
/*
246224
* Worker for addHyperLogLog().
247225
*

src/include/lib/hyperloglog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ extern void initHyperLogLog(hyperLogLogState *cState, uint8 bwidth);
6363
extern void initHyperLogLogError(hyperLogLogState *cState, double error);
6464
extern void addHyperLogLog(hyperLogLogState *cState, uint32 hash);
6565
extern double estimateHyperLogLog(hyperLogLogState *cState);
66-
extern void mergeHyperLogLog(hyperLogLogState *cState, const hyperLogLogState *oState);
6766
extern void freeHyperLogLog(hyperLogLogState *cState);
6867

6968
#endif /* HYPERLOGLOG_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy