pgvector.git / summary / log / commit / refs

commit    17ec3f3852667cfb91932dcaab7026f5983fa5ec
Author:   Andrew Kane <andrew@ankane.org>
Date:     Mon Jan 03 00:24:50 2022 +0000

    Moved test


test/expected/cast.out | 7 +++++++ test/expected/functions.out | 6 ------ test/sql/cast.sql | 3 +++ test/sql/functions.sql | 2 -- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/test/expected/cast.out b/test/expected/cast.out index 213f5c84..fe0b721c 100644 --- a/test/expected/cast.out +++ b/test/expected/cast.out @@ -42,3 +42,10 @@ SELECT '[1,2,3]'::vector::real[]; SELECT array_agg(n)::vector FROM generate_series(1, 1025) n; ERROR: vector cannot have more than 1024 dimensions +-- ensure no error +SELECT ARRAY[1,2,3] = ARRAY[1,2,3]; + ?column? +---------- + t +(1 row) + diff --git a/test/expected/functions.out b/test/expected/functions.out index 8a2efb7a..930a60e2 100644 --- a/test/expected/functions.out +++ b/test/expected/functions.out @@ -54,9 +54,3 @@ SELECT cosine_distance('[1,2]', '[0,0]'); SELECT cosine_distance('[1,2]', '[3]'); ERROR: different vector dimensions 2 and 1 -SELECT ARRAY[1,2,3] = ARRAY[1,2,3]; - ?column? ----------- - t -(1 row) - diff --git a/test/sql/cast.sql b/test/sql/cast.sql index caf05074..8fa99dc8 100644 --- a/test/sql/cast.sql +++ b/test/sql/cast.sql @@ -12,3 +12,6 @@ SELECT '{-Infinity}'::real[]::vector; SELECT '{}'::real[]::vector; SELECT '[1,2,3]'::vector::real[]; SELECT array_agg(n)::vector FROM generate_series(1, 1025) n; + +-- ensure no error +SELECT ARRAY[1,2,3] = ARRAY[1,2,3]; diff --git a/test/sql/functions.sql b/test/sql/functions.sql index adb76955..7f397a21 100644 --- a/test/sql/functions.sql +++ b/test/sql/functions.sql @@ -16,5 +16,3 @@ SELECT inner_product('[1,2]', '[3]'); SELECT round(cosine_distance('[1,2]', '[2,4]')::numeric, 5); SELECT cosine_distance('[1,2]', '[0,0]'); SELECT cosine_distance('[1,2]', '[3]'); - -SELECT ARRAY[1,2,3] = ARRAY[1,2,3]; [parent: 8df12a62e735]