From cdb1c9a6d3eb813826aefcacab9c735f95f1aa89 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 21 Jan 2024 16:07:44 -0800 Subject: [PATCH] Fixed test logic [skip ci] --- test/t/018_hnsw_filtering.pl | 4 ++-- test/t/019_ivfflat_filtering.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/t/018_hnsw_filtering.pl b/test/t/018_hnsw_filtering.pl index 9e3b657..c613a91 100644 --- a/test/t/018_hnsw_filtering.pl +++ b/test/t/018_hnsw_filtering.pl @@ -47,13 +47,13 @@ like($explain, qr/Index Scan using idx/); # Test attribute filtering with few rows removed comparison $explain = $node->safe_psql("postgres", qq( - EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit; + EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit; )); like($explain, qr/Index Scan using idx/); # Test attribute filtering with many rows removed comparison $explain = $node->safe_psql("postgres", qq( - EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit; + EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit; )); # TODO Do not use index like($explain, qr/Index Scan using idx/); diff --git a/test/t/019_ivfflat_filtering.pl b/test/t/019_ivfflat_filtering.pl index 8a6955e..15cf8cb 100644 --- a/test/t/019_ivfflat_filtering.pl +++ b/test/t/019_ivfflat_filtering.pl @@ -47,13 +47,13 @@ like($explain, qr/Index Scan using idx/); # Test attribute filtering with few rows removed comparison $explain = $node->safe_psql("postgres", qq( - EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit; + EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit; )); like($explain, qr/Index Scan using idx/); # Test attribute filtering with many rows removed comparison $explain = $node->safe_psql("postgres", qq( - EXPLAIN ANALYZE SELECT i FROM tst WHERE c >= 1 ORDER BY v <-> '$query' LIMIT $limit; + EXPLAIN ANALYZE SELECT i FROM tst WHERE c < 1 ORDER BY v <-> '$query' LIMIT $limit; )); # TODO Do not use index like($explain, qr/Index Scan using idx/);