From 2a7b38bf1f33bd5a27e210b7ca7d73929da44886 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 20 Jan 2024 21:09:14 -0800 Subject: [PATCH] Added test for filtering with few rows removed --- test/t/018_hnsw_filtering.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/t/018_hnsw_filtering.pl b/test/t/018_hnsw_filtering.pl index 21b890a..fd61ff4 100644 --- a/test/t/018_hnsw_filtering.pl +++ b/test/t/018_hnsw_filtering.pl @@ -39,6 +39,12 @@ my $explain = $node->safe_psql("postgres", qq( # TODO Do not use index like($explain, qr/Index Scan using idx/); +# Test attribute filtering with few rows removed +my $explain = $node->safe_psql("postgres", qq( + EXPLAIN ANALYZE SELECT i FROM tst WHERE c != $c ORDER BY v <-> '$query' LIMIT $limit; +)); +like($explain, qr/Index Scan using idx/); + # Test distance filtering $explain = $node->safe_psql("postgres", qq( EXPLAIN ANALYZE SELECT i FROM tst WHERE v <-> '$query' < 1 ORDER BY v <-> '$query' LIMIT $limit;