mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 07:36:55 +08:00
Added tests for HNSW index dimensions for bit type [skip ci]
This commit is contained in:
@@ -49,3 +49,11 @@ CREATE INDEX ON t USING hnsw ((val::bit(3)) bit_hamming_ops);
|
|||||||
CREATE INDEX ON t USING hnsw ((val::bit(64001)) bit_hamming_ops);
|
CREATE INDEX ON t USING hnsw ((val::bit(64001)) bit_hamming_ops);
|
||||||
ERROR: column cannot have more than 64000 dimensions for hnsw index
|
ERROR: column cannot have more than 64000 dimensions for hnsw index
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
-- dimensions
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING hnsw (val bit_hamming_ops);
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t (val bit(64001));
|
||||||
|
CREATE INDEX ON t USING hnsw (val bit_hamming_ops);
|
||||||
|
ERROR: column cannot have more than 64000 dimensions for hnsw index
|
||||||
|
DROP TABLE t;
|
||||||
|
|||||||
@@ -33,3 +33,13 @@ CREATE INDEX ON t USING hnsw (val bit_hamming_ops);
|
|||||||
CREATE INDEX ON t USING hnsw ((val::bit(3)) bit_hamming_ops);
|
CREATE INDEX ON t USING hnsw ((val::bit(3)) bit_hamming_ops);
|
||||||
CREATE INDEX ON t USING hnsw ((val::bit(64001)) bit_hamming_ops);
|
CREATE INDEX ON t USING hnsw ((val::bit(64001)) bit_hamming_ops);
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
|
||||||
|
-- dimensions
|
||||||
|
|
||||||
|
CREATE TABLE t (val bit(64000));
|
||||||
|
CREATE INDEX ON t USING hnsw (val bit_hamming_ops);
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
CREATE TABLE t (val bit(64001));
|
||||||
|
CREATE INDEX ON t USING hnsw (val bit_hamming_ops);
|
||||||
|
DROP TABLE t;
|
||||||
|
|||||||
Reference in New Issue
Block a user