diff --git a/test/expected/hnsw_vector.out b/test/expected/hnsw_vector.out
index 134292b32..23fe19b95 100644
--- a/test/expected/hnsw_vector.out
+++ b/test/expected/hnsw_vector.out
@@ -31,6 +31,18 @@ SELECT * FROM t ORDER BY val <-> '[3,3,3]';
 -----
 (0 rows)
 
+-- insert to empty table and empty index
+INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL);
+INSERT INTO t (val) VALUES ('[1,2,4]');
+SELECT * FROM t ORDER BY val <-> '[3,3,3]';
+   val   
+---------
+ [1,2,3]
+ [1,2,4]
+ [1,1,1]
+ [0,0,0]
+(4 rows)
+
 DROP TABLE t;
 -- inner product
 CREATE TABLE t (val vector(3));
diff --git a/test/sql/hnsw_vector.sql b/test/sql/hnsw_vector.sql
index 328175829..939d36e2d 100644
--- a/test/sql/hnsw_vector.sql
+++ b/test/sql/hnsw_vector.sql
@@ -15,6 +15,11 @@ SELECT COUNT(*) FROM t;
 TRUNCATE t;
 SELECT * FROM t ORDER BY val <-> '[3,3,3]';
 
+-- insert to empty table and empty index
+INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL);
+INSERT INTO t (val) VALUES ('[1,2,4]');
+SELECT * FROM t ORDER BY val <-> '[3,3,3]';
+
 DROP TABLE t;
 
 -- inner product
