init pass vec_min vec_max vec_avg

This commit is contained in:
Alex Garcia 2024-06-12 00:10:00 -07:00
parent 6875f7649c
commit 44dcb3b391
3 changed files with 333 additions and 0 deletions

21
test.sql Normal file
View file

@ -0,0 +1,21 @@
.load dist/vec0
.mode box
.header on
create table test as
select value
from json_each('[
[1.0, 2.0, -3.0],
[-1.0, 2.0, 3.0],
[1.0, 2.0, 3.0],
[1.0, 2.0, 3.0],
[1.0, -2.0, 3.0]
]');
select
vec_to_json(vec_min(value)),
vec_to_json(vec_max(value)),
vec_to_json(vec_avg(value))
from test;