Query Discrepancy in Postgres HLL Test

Поиск
Список
Период
Сортировка
От Ayush Vatsa
Тема Query Discrepancy in Postgres HLL Test
Дата
Msg-id CACX+KaPCQAZn_+HzNEuw6qEP8Wv+p8wQpkf6dqM4ZGu5E91p-Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Query Discrepancy in Postgres HLL Test  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Hi PostgreSQL Community,
I'm currently delving into Postgres HLL (HyperLogLog) functionality and have encountered an unexpected behavior while executing queries from the "cumulative_add_sparse_edge.sql" regress test. This particular test data file involves three columns, with the last column representing an HLL (HyperLogLog) value derived from the previous HLL value and the current raw value.

Upon manual inspection of the query responsible for deriving the last row's HLL value, I noticed a discrepancy. When executing the query:
"""
-- '\x148B481002....' is second last rows hll value
SELECT hll_add('\x148B481002.....', hll_hashval(2561));
"""
instead of obtaining the expected value (''\x148B481002....''), I received a different output which is ('\x138b48000200410061008100a1 ........').

My initial assumption is that this could potentially be attributed to a precision error. However, I'm reaching out to seek clarity on why this disparity is occurring and to explore potential strategies for mitigating it (as I want the behaviour to be consistent to regress test file).

Regards
Ayush Vatsa

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: show fct_name of the function/procedure
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Query Discrepancy in Postgres HLL Test