Skip to content
Snippets Groups Projects
Commit 360ca27a authored by Robert Haas's avatar Robert Haas
Browse files

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
parent 59eb5512
No related branches found
No related tags found
No related merge requests found
...@@ -220,28 +220,6 @@ estimateHyperLogLog(hyperLogLogState *cState) ...@@ -220,28 +220,6 @@ estimateHyperLogLog(hyperLogLogState *cState)
return result; return result;
} }
/*
* Merges the estimate from one HyperLogLog state to another, returning the
* estimate of their union.
*
* The number of registers in each must match.
*/
void
mergeHyperLogLog(hyperLogLogState *cState, const hyperLogLogState *oState)
{
int r;
if (cState->nRegisters != oState->nRegisters)
elog(ERROR, "number of registers mismatch: %zu != %zu",
cState->nRegisters, oState->nRegisters);
for (r = 0; r < cState->nRegisters; ++r)
{
cState->hashesArr[r] = Max(cState->hashesArr[r], oState->hashesArr[r]);
}
}
/* /*
* Worker for addHyperLogLog(). * Worker for addHyperLogLog().
* *
......
...@@ -63,7 +63,6 @@ extern void initHyperLogLog(hyperLogLogState *cState, uint8 bwidth); ...@@ -63,7 +63,6 @@ extern void initHyperLogLog(hyperLogLogState *cState, uint8 bwidth);
extern void initHyperLogLogError(hyperLogLogState *cState, double error); extern void initHyperLogLogError(hyperLogLogState *cState, double error);
extern void addHyperLogLog(hyperLogLogState *cState, uint32 hash); extern void addHyperLogLog(hyperLogLogState *cState, uint32 hash);
extern double estimateHyperLogLog(hyperLogLogState *cState); extern double estimateHyperLogLog(hyperLogLogState *cState);
extern void mergeHyperLogLog(hyperLogLogState *cState, const hyperLogLogState *oState);
extern void freeHyperLogLog(hyperLogLogState *cState); extern void freeHyperLogLog(hyperLogLogState *cState);
#endif /* HYPERLOGLOG_H */ #endif /* HYPERLOGLOG_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment