From: zthhhhh (@zthhhhh) <noreply+zthhhhh@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] PR #943: Fix a detail in the tap test case.
Date: Sun, 04 Jan 2026 08:15:27 +0000
Message-ID: <gh-pgvector-pgvector-943@github.com> (raw)
Hi pgvector team,
Recently, while writing regression tests for my patch, I discovered an issue. In the test script 005_ivfflat_query_recall.pl, ivfflat vector indexes are created separately for l2_distance, ip_distance, and cosine_distance. However, only the recall results for l2_distance are verified against expected values. This appears to be an oversight, although it likely has minimal impact, I still believe it's worth fixing.
inline patch 1: test/t/005_ivfflat_query_recall.pl (+1/-1 lines) download inline-1.patchdiff --git a/test/t/005_ivfflat_query_recall.pl b/test/t/005_ivfflat_query_recall.plindex 714e3a289..bf53b4a58 100644--- a/test/t/005_ivfflat_query_recall.pl+++ b/test/t/005_ivfflat_query_recall.pl@@ -35,7 +35,7 @@
my $query = $node->safe_psql("postgres", "SELECT v FROM tst WHERE i = $id;");
my $res = $node->safe_psql("postgres", qq(
SET enable_seqscan = off;
- SELECT v FROM tst ORDER BY v <-> '$query' LIMIT 1;+ SELECT v FROM tst ORDER BY v '$operator' '$query' LIMIT 1;
));
is($res, $query);
}