From 16d5c17e2334227c0bd35033c46cdbba0418496a Mon Sep 17 00:00:00 2001 From: Narek Galstyan Date: Sat, 24 Feb 2024 02:24:31 +0000 Subject: [PATCH] Disable flaky tests --- test/expected/hnsw_pq_index.out | 29 ++++++++--------------------- test/sql/hnsw_pq_index.sql | 15 +++++++++------ 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/test/expected/hnsw_pq_index.out b/test/expected/hnsw_pq_index.out index 621b27c32..83ffff63e 100644 --- a/test/expected/hnsw_pq_index.out +++ b/test/expected/hnsw_pq_index.out @@ -218,13 +218,8 @@ SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 1; -- add another entry with vector v4, and search for it again INSERT INTO small_world_pq(id, v) VALUES (42, :'v4'); -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; - array_agg ------------ - {4,42} -(1 row) - +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; ALTER TABLE small_world_pq DROP COLUMN v_pq; ALTER TABLE small_world_pq DROP COLUMN v_pq_dec; DROP TABLE _lantern_internal.pq_small_world_pq_v; @@ -255,22 +250,14 @@ INFO: validate_index() done, no issues found. (1 row) -- we had inserted a value with id=42 and vector=:'v4' above, before making the table unlogged -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; - array_agg ------------ - {4,42} -(1 row) - +-- disable these since they are flaky, depending on the the quality of the codebook +-- generated +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; -- add another entry with vector v4, and search for it again INSERT INTO small_world_pq(id, v) VALUES (44, :'v4'); -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 3) b; - array_agg ------------ - {4,42,44} -(1 row) - +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 3) b; -- Larger indexes SELECT quantize_table('sift_base1k'::regclass, 'v', 200, 32, 'l2sq'); INFO: Table scanned. Dataset size 1000 diff --git a/test/sql/hnsw_pq_index.sql b/test/sql/hnsw_pq_index.sql index de1e99a0c..d237a625f 100644 --- a/test/sql/hnsw_pq_index.sql +++ b/test/sql/hnsw_pq_index.sql @@ -66,8 +66,8 @@ EXPLAIN (COSTS FALSE) SELECT id, v, v_pq, v_pq_dec, (v <-> :'v4') as dist, (v_pq SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 1; -- add another entry with vector v4, and search for it again INSERT INTO small_world_pq(id, v) VALUES (42, :'v4'); -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; ALTER TABLE small_world_pq DROP COLUMN v_pq; ALTER TABLE small_world_pq DROP COLUMN v_pq_dec; @@ -82,12 +82,15 @@ UPDATE small_world_pq SET v_pq_dec=dequantize_vector(v_pq, '_lantern_internal.pq CREATE INDEX hnsw_pq_l2_index ON small_world_pq USING lantern_hnsw(v) WITH (pq=True); SELECT _lantern_internal.validate_index('hnsw_pq_l2_index', false); -- we had inserted a value with id=42 and vector=:'v4' above, before making the table unlogged -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; + +-- disable these since they are flaky, depending on the the quality of the codebook +-- generated +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 2) b; -- add another entry with vector v4, and search for it again INSERT INTO small_world_pq(id, v) VALUES (44, :'v4'); -SELECT ARRAY_AGG(id ORDER BY id) FROM - (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 3) b; +-- SELECT ARRAY_AGG(id ORDER BY id) FROM +-- (SELECT id FROM small_world_pq ORDER BY v <-> :'v4' LIMIT 3) b; -- Larger indexes