Skip to content

Commit

Permalink
Fix pq index recall diff check in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 authored and Ngalstyan4 committed Feb 24, 2024
1 parent c5e2263 commit 0784334
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion test/expected/hnsw_pq_index.out
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ SELECT calculate_table_recall('sift_base1k', 'sift_query1k', 'sift_truth1k', 'v'
SELECT (:'recall_pq'::float - :'recall_pq_index'::float)::float as recall_diff \gset
-- pq index costs no more than 10% in addition to what quantization has already cost us
-- recall diff must be positive but not large - the positive check sanity-checks that the index was used in calculate_table_recall
SELECT :recall_diff > 0 AND :recall_diff < 0.1 as recall_within_range;
SELECT :recall_diff >= 0 AND :recall_diff <= 0.1 as recall_within_range;
recall_within_range
---------------------
t
Expand Down
1 change: 0 additions & 1 deletion test/sql/hnsw_pq_index.sql
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ SELECT calculate_table_recall('sift_base1k', 'sift_query1k', 'sift_truth1k', 'v'
SELECT (:'recall_pq'::float - :'recall_pq_index'::float)::float as recall_diff \gset
-- pq index costs no more than 10% in addition to what quantization has already cost us
-- recall diff must be positive but not large - the positive check sanity-checks that the index was used in calculate_table_recall
SELECT :recall_diff;
SELECT :recall_diff >= 0 AND :recall_diff <= 0.1 as recall_within_range;

-- inserts
Expand Down

0 comments on commit 0784334

Please sign in to comment.