Skip to content

Commit

Permalink
update test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh committed Jan 15, 2024
1 parent 2b6223c commit 78eed9b
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions tutorial/src/vector.01-insert-scan.slt.ref
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
<main>:1
SELECT ARRAY [1.0, 1.0, 1.0] <-> ARRAY [-1.0, -1.0, -1.0] as distance;
----
3.464102

<main>:4
SELECT ARRAY [1.0, 1.0, 1.0] <=> ARRAY [-1.0, -1.0, -1.0] as distance;
----
2.000000

<main>:7
SELECT inner_product(ARRAY [1.0, 1.0, 1.0], ARRAY [-1.0, -1.0, -1.0]) as distance;
----
3.000000

<main>:10
CREATE TABLE t1(v1 VECTOR(3), v2 integer);
----
Table created with id = 24

<main>:4
<main>:13
INSERT INTO t1 VALUES (ARRAY [1.0, 1.0, 1.0], 1), (ARRAY [2.0, 1.0, 1.0], 2), (ARRAY [3.0, 1.0, 1.0], 3), (ARRAY [4.0, 1.0, 1.0], 4);
----
0

<main>:7
<main>:16
SELECT * FROM t1;
----
[1,1,1] 1
[2,1,1] 2
[3,1,1] 3
[4,1,1] 4

<main>:10
<main>:19
SELECT v1, ARRAY [1.0, 1.0, 1.0] <-> v1 as distance FROM t1;
----
[1,1,1] 0.000000
[2,1,1] 1.000000
[3,1,1] 2.000000
[4,1,1] 3.000000

<main>:13
<main>:22
SELECT v1, ARRAY [1.0, 1.0, 1.0] <=> v1 as distance FROM t1;
----
[1,1,1] 0.000000
[2,1,1] 0.057191
[3,1,1] 0.129612
[4,1,1] 0.183503

<main>:16
<main>:25
SELECT v1, inner_product(ARRAY [1.0, 1.0, 1.0], v1) as distance FROM t1;
----
[1,1,1] -3.000000
Expand Down

0 comments on commit 78eed9b

Please sign in to comment.