public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Ayush Vatsa <[email protected]>
To: [email protected]
Subject: Re: Query Discrepancy in Postgres HLL Test
Date: Sun, 28 Apr 2024 08:07:48 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACX+KaPCQAZn_+HzNEuw6qEP8Wv+p8wQpkf6dqM4ZGu5E91p-Q@mail.gmail.com>
References: <CACX+KaPCQAZn_+HzNEuw6qEP8Wv+p8wQpkf6dqM4ZGu5E91p-Q@mail.gmail.com>

On 4/28/24 06:01, Ayush Vatsa wrote:
> 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 
> <https://github.com/citusdata/postgresql-hll/blob/master/sql/cumulative_add_sparse_edge.sql#L28-L36&g...; regress test. This particular test data file <https://github.com/citusdata/postgresql-hll/blob/master/sql/data/cumulative_add_sparse_edge.csv#L515...; 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).

I would say your best option is to file an issue here:

https://github.com/citusdata/postgresql-hll/issues

> 
> Regards
> Ayush Vatsa

-- 
Adrian Klaver
[email protected]







reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Query Discrepancy in Postgres HLL Test
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox