v2-0004-Improve-the-comment-for-addHyperLogLog.patch
text/x-patch
Filename: v2-0004-Improve-the-comment-for-addHyperLogLog.patch
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0004
Subject: Improve the comment for addHyperLogLog()
| File | + | − |
|---|---|---|
| src/backend/lib/hyperloglog.c | 1 | 1 |
From f6753622e89efc632150ffdd1aaddcb58e427106 Mon Sep 17 00:00:00 2001 From: Aleksander Alekseev <aleksander@tigerdata.com> Date: Tue, 3 Feb 2026 17:24:19 +0300 Subject: [PATCH v2 4/5] Improve the comment for addHyperLogLog() Previously the comment suggested to use hash_any() which return value is Datum. Since the second argument of addHyperLogLog() is not a Datum but rather uint32, recommending hash_bytes() is more appropriate. Author: Aleksander Alekseev <aleksander@tigerdata.com> Suggested-by: John Naylor <johncnaylorls@gmail.com> Reviewed-by: TODO FIXME Discussion: https://postgr.es/m/CAJ7c6TMPhDRQMmkUHPv8oOK97B1mR8NRS61DgjpdaZUPAwaeZQ%40mail.gmail.com --- src/backend/lib/hyperloglog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/lib/hyperloglog.c b/src/backend/lib/hyperloglog.c index c74f11217ef..2b82ff12b2e 100644 --- a/src/backend/lib/hyperloglog.c +++ b/src/backend/lib/hyperloglog.c @@ -158,7 +158,7 @@ freeHyperLogLog(hyperLogLogState *cState) * Adds element to the estimator, from caller-supplied hash. * * It is critical that the hash value passed be an actual hash value, typically - * generated using hash_any(). The algorithm relies on a specific bit-pattern + * generated using hash_bytes(). The algorithm relies on a specific bit-pattern * observable in conjunction with stochastic averaging. There must be a * uniform distribution of bits in hash values for each distinct original value * observed. -- 2.43.0