Re: Query Discrepancy in Postgres HLL Test - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Query Discrepancy in Postgres HLL Test
Date
Msg-id a808a4b3-7f1d-4826-bc44-55565f0a99b9@aklaver.com
Whole thread Raw
In response to Query Discrepancy in Postgres HLL Test  (Ayush Vatsa <ayushvatsa1810@gmail.com>)
List pgsql-general
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>" regress test.
Thisparticular test data file
<https://github.com/citusdata/postgresql-hll/blob/master/sql/data/cumulative_add_sparse_edge.csv#L515-L516>involves
threecolumns, with the last column representing an HLL (HyperLogLog) value derived from the previous HLL value and the
currentraw 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
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Ayush Vatsa
Date:
Subject: Query Discrepancy in Postgres HLL Test
Next
From: "Cocam' server"
Date:
Subject: Need help to make space on my database