From ec9e13b5fb676c93367bf5be0f7643f17a580b14 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 25 Mar 2024 15:50:38 -0700 Subject: [PATCH] Improved test [skip ci] --- test/expected/hnsw_hamming.out | 4 ++-- test/sql/hnsw_hamming.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/expected/hnsw_hamming.out b/test/expected/hnsw_hamming.out index 5c73dc0..0483281 100644 --- a/test/expected/hnsw_hamming.out +++ b/test/expected/hnsw_hamming.out @@ -2,8 +2,8 @@ SET enable_seqscan = off; CREATE TABLE t (val bit(3)); INSERT INTO t (val) VALUES (B'000'), (B'100'), (B'111'), (NULL); CREATE INDEX ON t USING hnsw (val bit_hamming_ops); -INSERT INTO t (val) VALUES ('110'); -SELECT * FROM t ORDER BY val <~> '111'; +INSERT INTO t (val) VALUES (B'110'); +SELECT * FROM t ORDER BY val <~> B'111'; val ----- 111 diff --git a/test/sql/hnsw_hamming.sql b/test/sql/hnsw_hamming.sql index 1e096e1..fb21511 100644 --- a/test/sql/hnsw_hamming.sql +++ b/test/sql/hnsw_hamming.sql @@ -4,9 +4,9 @@ CREATE TABLE t (val bit(3)); INSERT INTO t (val) VALUES (B'000'), (B'100'), (B'111'), (NULL); CREATE INDEX ON t USING hnsw (val bit_hamming_ops); -INSERT INTO t (val) VALUES ('110'); +INSERT INTO t (val) VALUES (B'110'); -SELECT * FROM t ORDER BY val <~> '111'; +SELECT * FROM t ORDER BY val <~> B'111'; SELECT COUNT(*) FROM (SELECT * FROM t ORDER BY val <~> (SELECT NULL::bit)) t2; DROP TABLE t;