pgvector.git / summary / log / commit / refs
commit d64295dfd756d7582a4bed7878ee1911504837ef
Author: Andrew Kane <andrew@ankane.org>
Date: Wed Apr 10 23:38:07 2024 +0000
Improved test SQL [skip ci]
test/t/020_hnsw_bit_build_recall.pl | 2 +-
test/t/023_hnsw_bit_insert_recall.pl | 2 +-
test/t/029_hnsw_bit_vacuum_recall.pl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/t/020_hnsw_bit_build_recall.pl b/test/t/020_hnsw_bit_build_recall.pl
index d60f98c5..6ccc22ac 100644
--- a/test/t/020_hnsw_bit_build_recall.pl
+++ b/test/t/020_hnsw_bit_build_recall.pl
@@ -85,7 +85,7 @@ for my $i (0 .. $#operators)
# Handle ties
my $res = $node->safe_psql("postgres", qq(
WITH top AS (
- SELECT v $operator $_ AS distance FROM tst ORDER BY v $operator $_ LIMIT $limit
+ SELECT v $operator $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v $operator $_) <= (SELECT MAX(distance) FROM top)
));
diff --git a/test/t/023_hnsw_bit_insert_recall.pl b/test/t/023_hnsw_bit_insert_recall.pl
index bee72d79..8e6a1ac6 100644
--- a/test/t/023_hnsw_bit_insert_recall.pl
+++ b/test/t/023_hnsw_bit_insert_recall.pl
@@ -98,7 +98,7 @@ for my $i (0 .. $#operators)
my $res = $node->safe_psql("postgres", qq(
SET enable_indexscan = off;
WITH top AS (
- SELECT v $operator $_ AS distance FROM tst ORDER BY v $operator $_ LIMIT $limit
+ SELECT v $operator $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v $operator $_) <= (SELECT MAX(distance) FROM top)
));
diff --git a/test/t/029_hnsw_bit_vacuum_recall.pl b/test/t/029_hnsw_bit_vacuum_recall.pl
index ccff0dbb..8a0a613a 100644
--- a/test/t/029_hnsw_bit_vacuum_recall.pl
+++ b/test/t/029_hnsw_bit_vacuum_recall.pl
@@ -83,7 +83,7 @@ foreach (@queries)
my $res = $node->safe_psql("postgres", qq(
SET enable_indexscan = off;
WITH top AS (
- SELECT v <~> $_ AS distance FROM tst ORDER BY v <~> $_ LIMIT $limit
+ SELECT v <~> $_ AS distance FROM tst ORDER BY distance LIMIT $limit
)
SELECT i FROM tst WHERE (v <~> $_) <= (SELECT MAX(distance) FROM top)
));
[parent: 8178a902ce12]