diff --git a/test/expected/hnsw_vector.out b/test/expected/hnsw_vector.out index 29ea724..cb4d8b9 100644 --- a/test/expected/hnsw_vector.out +++ b/test/expected/hnsw_vector.out @@ -123,6 +123,12 @@ SELECT * FROM t ORDER BY val <-> '[3,3,3]'; [0,0,0] (3 rows) +TRUNCATE t; +SELECT * FROM t ORDER BY val <-> '[3,3,3]'; + val +----- +(0 rows) + RESET hnsw.iterative_scan; RESET hnsw.ef_search; DROP TABLE t; diff --git a/test/expected/ivfflat_vector.out b/test/expected/ivfflat_vector.out index 5a6bc75..aad8226 100644 --- a/test/expected/ivfflat_vector.out +++ b/test/expected/ivfflat_vector.out @@ -110,6 +110,15 @@ SELECT * FROM t ORDER BY val <-> '[3,3,3]'; [1,1,1] (2 rows) +TRUNCATE t; +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +SELECT * FROM t ORDER BY val <-> '[3,3,3]'; + val +----- +(0 rows) + RESET ivfflat.iterative_scan; RESET ivfflat.max_probes; DROP TABLE t; diff --git a/test/sql/hnsw_vector.sql b/test/sql/hnsw_vector.sql index 184d65f..a928ba4 100644 --- a/test/sql/hnsw_vector.sql +++ b/test/sql/hnsw_vector.sql @@ -70,6 +70,9 @@ SELECT * FROM t ORDER BY val <-> '[3,3,3]'; SET hnsw.iterative_scan = relaxed_order; SELECT * FROM t ORDER BY val <-> '[3,3,3]'; +TRUNCATE t; +SELECT * FROM t ORDER BY val <-> '[3,3,3]'; + RESET hnsw.iterative_scan; RESET hnsw.ef_search; DROP TABLE t; diff --git a/test/sql/ivfflat_vector.sql b/test/sql/ivfflat_vector.sql index 785fc6c..4c20d2f 100644 --- a/test/sql/ivfflat_vector.sql +++ b/test/sql/ivfflat_vector.sql @@ -59,6 +59,9 @@ SELECT * FROM t ORDER BY val <-> '[3,3,3]'; SET ivfflat.max_probes = 2; SELECT * FROM t ORDER BY val <-> '[3,3,3]'; +TRUNCATE t; +SELECT * FROM t ORDER BY val <-> '[3,3,3]'; + RESET ivfflat.iterative_scan; RESET ivfflat.max_probes; DROP TABLE t;