From 17ec3f3852667cfb91932dcaab7026f5983fa5ec Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 2 Jan 2022 19:24:50 -0500 Subject: [PATCH] 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 213f5c8..fe0b721 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 8a2efb7..930a60e 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 caf0507..8fa99dc 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 adb7695..7f397a2 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];