From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz> |
Subject: | Re: Abbreviated keys for Numeric |
Date: | 2015-03-24 05:36:56 |
Message-ID: | 87r3sf7yu9.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Peter" == Peter Geoghegan <pg(at)heroku(dot)com> writes:
Peter> By the way, there was another bug in this that I forgot to point
Peter> out, but removed, here:
"removed"? looks just the same in either of your patches...
Peter> + if (nss->estimating)
Peter> + {
Peter> + uint32 tmp = (uint32)result;
Peter> + addHyperLogLog(&nss->abbr_card, hash_uint32(tmp));
Peter> + }
Yes, that should have DatumGetUInt32() around the hash_uint32, thanks
Peter> (I simply operate on the raw Datum when hashing for hyperLogLog,
Peter> in a similar manner to the text opclass, which is safe with 8
Peter> byte datums + pass by value int64).
But this paragraph makes no sense, and the code currently in varlena.c
is just as wrong in its usage of hash_uint32 as I was.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-03-24 05:46:17 | Re: Abbreviated keys for Numeric |
Previous Message | Kyotaro HORIGUCHI | 2015-03-24 05:34:27 | Re: WIP: multivariate statistics / proof of concept |