Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s149q-009B1E-IH for pgsql-general@arkaria.postgresql.org; Sun, 28 Apr 2024 13:01:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s149m-00Cwtm-Cw for pgsql-general@arkaria.postgresql.org; Sun, 28 Apr 2024 13:01:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s149m-00Cwtd-01 for pgsql-general@lists.postgresql.org; Sun, 28 Apr 2024 13:01:26 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s149f-000VaW-6u for pgsql-general@lists.postgresql.org; Sun, 28 Apr 2024 13:01:26 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5726ccca4c8so1247574a12.3 for ; Sun, 28 Apr 2024 06:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714309277; x=1714914077; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=cGsNM5xuYxXVnpX6LbbOJFC3a+R/nVEjWtJjkplJCPI=; b=BLRZr2MPxGHl0lgWE9x5qtfCHLzHVBFbv4OZWEQCKwzsYwAQyDSgo4hBjPfqr3QCdv XO6g255OROSz/KV/GDNYX2SGcqRyswiSqs8gKzc1uzckyCCvLPOyB6ufg3qJHwf/ONus OQkflflsJTNtijeJwVaPNZ13sbCeMRCREtpvjujQGoc11smWxFYBRsVdWGR6VBeClLZW hMGCQHtwf2zdpr5jRpaWq6OAnC7mOl3akntkQ3sM6O6ygtTGRl1MeBpMIi/gTHr/188O cn5g8ihz2nQqmmVFGlZ7NrA5S4cRS7WceLu1+XuYJCAk0003/kUiTkWwNip4DSbSeH9E CSAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714309277; x=1714914077; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cGsNM5xuYxXVnpX6LbbOJFC3a+R/nVEjWtJjkplJCPI=; b=BiI1jGAumWERDKORMNjpRhSa9ufmEttAycX9BASUYySsks48sHdVXTUu8Ex08fzqZS PiOWZ0sIXmLRYTGjVGo0sbz/h+OFIhvEktz2pn77zuzP2DMKB7FLMn0+KKVR66v9+hP6 PrX/SXWPPChHKcrrXW5+wKf3mcUiNd7imGjgmW3W4ufTZ7pckfZjU4M6KnHR0W+hUOmR PeYcdr1k91xss69GjRx7GQcH5geoDU5pwMnLm1P+EIRu7i1f492sBHLcYRgoPf9bFcnu dRNFZgHGAbLuKKv7s0xtTIZgCqFbyrU8Vfvtrsmd55D5vPOIXY1oRE3VJtJ8EbQuUjNY Wtnw== X-Gm-Message-State: AOJu0YxVFA2HZn3TQlSiE2vhK5Msrah0VMnFHnAK/YRrhIJdoju8w6YY TRIHvwt2l9dT99ld7O0v6f/HZ77Yg7dKP4DQcRWzYlL38o8gVin3BDEaGafp6hDPsfqVzWScDXH monKBLf3vXo/7NYELBOwWOiebNKrdFluu9pY= X-Google-Smtp-Source: AGHT+IGwWgDqdijRrtpod2QNIASKz40QdIXX0mqpsGH2FP+kJCvsSApqEH7Ls7j7hsIDeSA/FU14hXDAhxHGesCwjoA= X-Received: by 2002:a50:d58e:0:b0:570:388:ee0b with SMTP id v14-20020a50d58e000000b005700388ee0bmr4260103edi.42.1714309276786; Sun, 28 Apr 2024 06:01:16 -0700 (PDT) MIME-Version: 1.0 From: Ayush Vatsa Date: Sun, 28 Apr 2024 18:31:05 +0530 Message-ID: Subject: Query Discrepancy in Postgres HLL Test To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000007a6b66061727bbb6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007a6b66061727bbb6 Content-Type: text/plain; charset="UTF-8" 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 --0000000000007a6b66061727bbb6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi PostgreSQL Community,
I'm currently delving into= Postgres HLL (HyperLogLog) functionality and=20 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=20 representing an HLL (HyperLogLog) value derived from the previous HLL=20 value and the current raw value.

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

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

Regards
Ayush Vatsa
--0000000000007a6b66061727bbb6--