github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/vector/vector_func.sql (about) 1 create table vtab32(id int primary key auto_increment,`vecf32_3` vecf32(3),`vecf32_5` vecf32(5)); 2 create table vtab64(id int primary key auto_increment,`vecf64_3` vecf64(3),`vecf64_5` vecf64(5)); 3 4 insert into vtab32(vecf32_3,vecf32_5) values("[0.8166459,NULL,0.4886152]",NULL); 5 insert into vtab32(vecf32_3,vecf32_5) values(NULL,NULL); 6 insert into vtab32(vecf32_3,vecf32_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 7 insert into vtab32(vecf32_3,vecf32_5) values("0.1726299,3.29088557,30.4330937","0.1726299,3.29088557,30.4330937"); 8 insert into vtab32(vecf32_3,vecf32_5) values ("[0.1726299,3.29088557,30.4330937]","[0.45052445,2.19845265,9.579752,123.48039162,4635.89423394]"); 9 insert into vtab32(vecf32_3,vecf32_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 10 insert into vtab64(vecf64_3,vecf64_5) values("[0.8166459,NULL,0.4886152]",NULL); 11 insert into vtab64(vecf64_3,vecf64_5) values(NULL,NULL); 12 insert into vtab64(vecf64_3,vecf64_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 13 insert into vtab64(vecf64_3,vecf64_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 14 insert into vtab64(vecf64_3,vecf64_5) values ("[0.9260021,0.26637346,0.06567037]","[0.45756745,65.2996871,321.623636,3.60082066,87.58445764]"); 15 16 select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32; 17 select SUMMATION(vecf64_3),SUMMATION(vecf64_5) from vtab64; 18 19 select SUMMATION("[0.45052445,2.19845265,9.579752]"); 20 select SUMMATION(1); 21 select SUMMATION(NULL); 22 select id, SUMMATION(vecf32_3) from vtab32 group by id order by id; 23 select id, count(vecf32_3) from vtab32 group by id having id > 1 order by id ; 24 select count(*), SUMMATION(vecf32_3) from vtab32 group by SUMMATION(vecf32_3) Having SUMMATION(vecf32_3) > 33.89660960435867 order by SUMMATION(vecf32_3) desc ; 25 select * from vtab32 where SUMMATION(vecf32_3) is null; 26 select * from vtab32 where SUMMATION(vecf32_3) = 33.89660960435867; 27 select * from vtab32 where SUMMATION(vecf32_3) > 33.89660960435867; 28 select distinct(SUMMATION(vecf32_3)) from vtab32; 29 select sum(SUMMATION(vecf32_3)) from vtab32; 30 select min(SUMMATION(vecf32_3)) from vtab32; 31 select max(SUMMATION(vecf32_3)) from vtab32; 32 select avg(SUMMATION(vecf32_3)) from vtab32; 33 select count(SUMMATION(vecf32_3)) from vtab32; 34 select abs(SUMMATION(vecf64_3)) from vtab64; 35 select atan(SUMMATION(vecf64_3)) from vtab64; 36 select SUMMATION(vecf32_3) - SUMMATION(vecf32_5) from vtab32; 37 select SUMMATION(vecf32_3) * SUMMATION(vecf32_5) from vtab32; 38 select SUMMATION(vecf64_3) + SUMMATION(vecf64_5) from vtab64; 39 select SUMMATION(vecf64_3) / SUMMATION(vecf64_5) from vtab64; 40 select * from (select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32); 41 select SUMMATION(vecf64_3),SUMMATION(vecf64_5) from (select * from vtab64); 42 WITH qn AS (select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32) SELECT * FROM qn; 43 44 45 46 select inner_product(vecf32_3,"[1,1,1]") from vtab32; 47 select inner_product(vecf32_3,"[0,0,-1]") from vtab32; 48 select inner_product(vecf32_3,vecf32_3), inner_product(vecf32_5,vecf32_5) from vtab32; 49 select inner_product(vecf64_3,vecf64_3), inner_product(vecf64_5,vecf64_5) from vtab64; 50 select inner_product("[0.45052445,2.19845265,9.579752]","[1,1,1]"); 51 select inner_product(1,1); 52 select inner_product(NULL,NULL); 53 select id, inner_product(vecf32_3,vecf32_3) from vtab32 group by id order by id; 54 select count(*), inner_product(vecf32_3,vecf32_3) from vtab32 group by inner_product(vecf32_3,vecf32_3) Having inner_product(vecf32_3,vecf32_3) > 937.0329415976587 order by inner_product(vecf32_3,vecf32_3) desc ; 55 select * from vtab32 where inner_product(vecf32_3,vecf32_3) is null; 56 select * from vtab32 where inner_product(vecf32_3,vecf32_3) = 675766.8704508307; 57 select * from vtab32 where inner_product(vecf32_3,vecf32_3) <= 1.3494319015309593; 58 select distinct(inner_product(vecf32_3,vecf32_3)) from vtab32; 59 select sum(inner_product(vecf32_3,vecf32_3)) from vtab32; 60 select min(inner_product(vecf32_5,vecf32_5)) from vtab32; 61 select max(inner_product(vecf32_3,vecf32_3)) from vtab32; 62 select avg(inner_product(vecf32_5,vecf32_5)) from vtab32; 63 select count(inner_product(vecf32_5,vecf32_5)) from vtab32; 64 select sin(inner_product(vecf64_3,vecf64_3)) from vtab64; 65 select cos(inner_product(vecf64_5,vecf64_5)) from vtab64; 66 select inner_product(vecf32_3,vecf32_3) - inner_product(vecf32_5,vecf32_5) from vtab32; 67 select inner_product(vecf32_3,vecf32_3) * inner_product(vecf32_5,vecf32_5) from vtab32; 68 select inner_product(vecf64_3,vecf64_3) + inner_product(vecf64_5,vecf64_5) from vtab64; 69 select inner_product(vecf64_3,vecf64_3) / inner_product(vecf64_5,vecf64_5) from vtab64; 70 select * from (select inner_product(vecf32_3,vecf32_3),inner_product(vecf32_5,vecf32_5) from vtab32); 71 select inner_product(vecf64_3,vecf64_3), inner_product(vecf64_5,vecf64_5) from (select * from vtab64); 72 WITH qn AS (select inner_product(vecf32_3,vecf32_3),inner_product(vecf32_5,vecf32_5) from vtab32) SELECT * FROM qn; 73 74 75 76 select l1_norm(vecf32_3), l1_norm(vecf32_5) from vtab32; 77 select l1_norm(vecf64_3), l1_norm(vecf64_5) from vtab64; 78 select l1_norm(vecf64_3 - vecf32_3),l1_norm(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 79 select l1_norm(NULL); 80 select l1_norm(1); 81 select l1_norm("[1,2,3]"); 82 select count(*), l1_norm(vecf32_3) from vtab32 group by l1_norm(vecf32_3) Having l1_norm(vecf32_3) > 1.9714266657829285 order by l1_norm(vecf32_3) desc ; 83 select * from vtab32 where l1_norm(vecf32_3) is null; 84 select * from vtab32 where l1_norm(vecf32_3) = 1.9714266657829285; 85 select * from vtab32 where l1_norm(vecf32_3) > 1.9714266657829285; 86 select distinct(l1_norm(vecf32_3)) from vtab32; 87 select sum(l1_norm(vecf32_3)) from vtab32; 88 select min(l1_norm(vecf32_3)) from vtab32; 89 select max(l1_norm(vecf32_3)) from vtab32; 90 select avg(l1_norm(vecf32_3)) from vtab32; 91 select count(l1_norm(vecf32_3)) from vtab32; 92 select abs(l1_norm(vecf64_3)) from vtab64; 93 select atan(l1_norm(vecf64_3)) from vtab64; 94 select l1_norm(vecf32_3) - l1_norm(vecf32_5) from vtab32; 95 select l1_norm(vecf32_3) * l1_norm(vecf32_5) from vtab32; 96 select l1_norm(vecf64_3) + l1_norm(vecf64_5) from vtab64; 97 select l1_norm(vecf64_3) / l1_norm(vecf64_5) from vtab64; 98 select * from (select l1_norm(vecf32_3),l1_norm(vecf32_5) from vtab32); 99 select l1_norm(vecf64_3),l1_norm(vecf64_5) from (select * from vtab64); 100 WITH qn AS (select l1_norm(vecf32_3),l1_norm(vecf32_5) from vtab32) SELECT * FROM qn; 101 102 103 104 105 select l2_norm(vecf32_3), l2_norm(vecf32_5) from vtab32; 106 select l2_norm(vecf64_3), l2_norm(vecf64_5) from vtab64; 107 select l2_norm(vecf64_3 - vecf32_3),l1_norm(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 108 select l2_norm(NULL); 109 select l2_norm(1); 110 select l2_norm("[1,2,3]"); 111 select count(*), l2_norm(vecf32_3) from vtab32 group by l2_norm(vecf32_3) Having l2_norm(vecf32_3) > 1.1616505074810406 order by l2_norm(vecf32_3) desc ; 112 select * from vtab32 where l2_norm(vecf32_3) is null; 113 select * from vtab32 where l2_norm(vecf32_3) = 1.1616505074810406; 114 select * from vtab32 where l2_norm(vecf32_3) > 1.1616505074810406; 115 select distinct(l2_norm(vecf32_3)) from vtab32; 116 select sum(l2_norm(vecf32_3)) from vtab32; 117 select min(l2_norm(vecf32_3)) from vtab32; 118 select max(l2_norm(vecf32_3)) from vtab32; 119 select avg(l2_norm(vecf32_3)) from vtab32; 120 select count(l2_norm(vecf32_3)) from vtab32; 121 select abs(l2_norm(vecf64_3)) from vtab64; 122 select atan(l2_norm(vecf64_3)) from vtab64; 123 select l2_norm(vecf32_3) - l2_norm(vecf32_5) from vtab32; 124 select l2_norm(vecf32_3) * l2_norm(vecf32_5) from vtab32; 125 select l2_norm(vecf64_3) + l2_norm(vecf64_5) from vtab64; 126 select l2_norm(vecf64_3) / l2_norm(vecf64_5) from vtab64; 127 select * from (select l2_norm(vecf32_3),l2_norm(vecf32_5) from vtab32); 128 select l2_norm(vecf64_3),l2_norm(vecf64_5) from (select * from vtab64); 129 WITH qn AS (select l2_norm(vecf32_3),l2_norm(vecf32_5) from vtab32) SELECT * FROM qn; 130 131 select vector_dims(vecf32_5),vector_dims(vecf32_3) from vtab32; 132 select vector_dims(vecf64_5),vector_dims(vecf64_3) from vtab64; 133 select vector_dims(vecf64_3 - vecf32_3),vector_dims(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 134 select vector_dims(NULL); 135 select vector_dims(1); 136 select vector_dims("[1,2,3]"); 137 select count(*), vector_dims(vecf32_3) from vtab32 group by vector_dims(vecf32_3) Having vector_dims(vecf32_3) > 1 order by vector_dims(vecf32_3) desc ; 138 select * from vtab32 where vector_dims(vecf32_3) is null; 139 select * from vtab32 where vector_dims(vecf32_3) = 3; 140 select * from vtab32 where vector_dims(vecf32_3) > 3; 141 select distinct(vector_dims(vecf32_3)) from vtab32; 142 select sum(vector_dims(vecf32_3)) from vtab32; 143 select min(vector_dims(vecf32_3)) from vtab32; 144 select max(vector_dims(vecf32_3)) from vtab32; 145 select avg(vector_dims(vecf32_3)) from vtab32; 146 select count(vector_dims(vecf32_3)) from vtab32; 147 select abs(vector_dims(vecf64_3)) from vtab64; 148 select atan(vector_dims(vecf64_3)) from vtab64; 149 select vector_dims(vecf32_3) - vector_dims(vecf32_5) from vtab32; 150 select vector_dims(vecf32_3) * vector_dims(vecf32_5) from vtab32; 151 select vector_dims(vecf64_3) + vector_dims(vecf64_5) from vtab64; 152 select vector_dims(vecf64_3) / vector_dims(vecf64_5) from vtab64; 153 select * from (select vector_dims(vecf32_3),vector_dims(vecf32_5) from vtab32); 154 select vector_dims(vecf64_3),vector_dims(vecf64_5) from (select * from vtab64); 155 WITH qn AS (select vector_dims(vecf32_3),vector_dims(vecf32_5) from vtab32) SELECT * FROM qn; 156 157 158 159 create table vtab32_1(id int primary key auto_increment,`vecf32_3` vecf32(3),`vecf32_3_1` vecf32(3),`vecf32_5` vecf32(5),`vecf32_5_1` vecf32(5)); 160 create table vtab64_1(id int primary key auto_increment,`vecf64_3` vecf64(3),`vecf64_3_1` vecf64(3),`vecf64_5` vecf64(5),`vecf64_5_1` vecf64(5)); 161 162 insert into vtab32_1(vecf32_3,vecf32_5) values("[0.8166459,NULL,0.4886152]",NULL); 163 insert into vtab32_1(vecf32_3,vecf32_5) values(NULL,NULL); 164 insert into vtab32_1(vecf32_3,vecf32_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 165 insert into vtab32_1(vecf32_3,vecf32_5) values("0.1726299,3.29088557,30.4330937","0.1726299,3.29088557,30.4330937"); 166 insert into vtab32_1(vecf32_3,vecf32_5) values ("[0.1726299,3.29088557,30.4330937]","[0.45052445,2.19845265,9.579752,123.48039162,4635.89423394]"); 167 insert into vtab32_1(vecf32_3,vecf32_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 168 insert into vtab64_1(vecf64_3,vecf64_5) values("[0.8166459,NULL,0.4886152]",NULL); 169 insert into vtab64_1(vecf64_3,vecf64_5) values(NULL,NULL); 170 insert into vtab64_1(vecf64_3,vecf64_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 171 insert into vtab64_1(vecf64_3,vecf64_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 172 insert into vtab64_1(vecf64_3,vecf64_5) values ("[0.9260021,0.26637346,0.06567037]","[0.45756745,65.2996871,321.623636,3.60082066,87.58445764]"); 173 update vtab32_1 set `vecf32_3_1` = `vecf32_3` + "[7.326893,10.787382173,21.32132143]"; 174 update vtab32_1 set `vecf32_5_1` = `vecf32_5` + "[7.326893,10.787382173,21.32132143,4.32132,98.321321]"; 175 update vtab64_1 set `vecf64_3_1` = `vecf64_3` + "[32.89849324,1.98392832,192.095843]"; 176 update vtab64_1 set `vecf64_5_1` = `vecf64_5` + "[32.89849324,1.98392832,192.095843,90.321321,23.12312321]"; 177 178 select cosine_similarity(vecf32_3,"[1,1,1]") from vtab32; 179 select cosine_similarity(vecf32_3,"[0,0,-1]") from vtab32; 180 select cosine_similarity(a.vecf32_3,b.vecf64_3), cosine_similarity(a.vecf32_5,b.vecf64_5) from vtab32 a , vtab64 b where a.id = b.id; 181 select cosine_similarity(b.vecf64_3, a.vecf32_3), cosine_similarity(b.vecf64_5, a.vecf32_5) from vtab32 a , vtab64 b where a.id = b.id; 182 select cosine_similarity("[0.45052445,2.19845265,9.579752]","[1,1,1]"); 183 select cosine_similarity(1,1); 184 select cosine_similarity(NULL,NULL); 185 select count(*), cosine_similarity(a.vecf32_3,b.vecf64_3) from vtab32 a , vtab64 b where a.id = b.id group by cosine_similarity(a.vecf32_3,b.vecf64_3) HAVING cosine_similarity(a.vecf32_3,b.vecf64_3) > 0.3 order by cosine_similarity(a.vecf32_3,b.vecf64_3) desc ; 186 187 select cosine_similarity(vecf32_3,vecf32_3_1) from vtab32_1; 188 select cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 189 select cosine_similarity(vecf64_3,vecf64_3_1) from vtab64_1; 190 select cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 191 192 select * from vtab32_1 where cosine_similarity(vecf32_3_1,vecf32_3) is null; 193 select * from vtab32_1 where cosine_similarity(vecf32_3,vecf32_3_1) = 0.9788139235276682; 194 select * from vtab32_1 where cosine_similarity(vecf32_3,vecf32_3) <= 0.9788139235276682; 195 select distinct(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 196 select sum(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 197 select min(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 198 select max(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 199 select avg(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 200 select count(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 201 select sin(cosine_similarity(vecf64_3,vecf64_3_1)) from vtab64_1; 202 select cos(cosine_similarity(vecf64_5,vecf64_5_1)) from vtab64_1; 203 select cosine_similarity(vecf32_3,vecf32_3_1) - cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 204 select cosine_similarity(vecf32_3,vecf32_3_1) * cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 205 select cosine_similarity(vecf64_3,vecf64_3_1) + cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 206 select cosine_similarity(vecf64_3,vecf64_3_1) / cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 207 select * from (select cosine_similarity(vecf32_3,vecf32_3_1),cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1); 208 select cosine_similarity(vecf64_3,vecf64_3_1), cosine_similarity(vecf64_5,vecf64_5_1) from (select * from vtab64_1); 209 WITH qn AS (select cosine_similarity(vecf32_3,vecf32_3_1),cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1) SELECT * FROM qn; 210 select cosine_similarity(vecf32_3,vecf32_3), cosine_similarity(vecf32_5,vecf32_5) from vtab32; 211 select cosine_similarity(vecf64_3,vecf64_3), cosine_similarity(vecf64_5,vecf64_5) from vtab64; 212 213 -- subvector function 214 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",-1) as sv ; 215 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",4) ; 216 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",9) ; 217 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",10) ; 218 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",0) ; 219 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",1) ; 220 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",NULL) ; 221 select subvector(NULL,4); 222 select subvector(NULL,NULL); 223 select subvector("abc",4); 224 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",3.4) ; 225 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,null) ; 226 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,0) ; 227 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,1) ; 228 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,3) ; 229 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,10) ; 230 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,5) ; 231 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,-2) ; 232 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,"3") ; 233 select subvector(NULL,3,4); 234 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",NULL,4); 235 236 create table vector_01(c1 int,c2 vecf32(128)); 237 insert into vector_01 values(10 ,"[1, 0, 1, 6, 6, 17, 47, 39, 2, 0, 1, 25, 27, 10, 56, 130, 18, 5, 2, 6, 15, 2, 19, 130, 42, 28, 1, 1, 2, 1, 0, 5, 0, 2, 4, 4, 31, 34, 44, 35, 9, 3, 8, 11, 33, 12, 61, 130, 130, 17, 0, 1, 6, 2, 9, 130, 111, 36, 0, 0, 11, 9, 1, 12, 2, 100, 130, 28, 7, 2, 6, 7, 9, 27, 130, 83, 5, 0, 1, 18, 130, 130, 84, 9, 0, 0, 2, 24, 111, 24, 0, 1, 37, 24, 2, 10, 12, 62, 33, 3, 0, 0, 0, 1, 3, 16, 106, 28, 0, 0, 0, 0, 17, 46, 85, 10, 0, 0, 1, 4, 11, 4, 2, 2, 9, 14, 8, 8]"),(60,"[0, 1, 1, 3, 0, 3, 46, 20, 1, 4, 17, 9, 1, 17, 108, 15, 0, 3, 37, 17, 6, 15, 116, 16, 6, 1, 4, 7, 7, 7, 9, 6, 0, 8, 10, 4, 26, 129, 27, 9, 0, 0, 5, 2, 11, 129, 129, 12, 103, 4, 0, 0, 2, 31, 129, 129, 94, 4, 0, 0, 0, 3, 13, 42, 0, 15, 38, 2, 70, 129, 1, 0, 5, 10, 40, 12, 74, 129, 6, 1, 129, 39, 6, 1, 2, 22, 9, 33, 122, 13, 0, 0, 0, 0, 5, 23, 4, 11, 9, 12, 45, 38, 1, 0, 0, 4, 36, 38, 57, 32, 0, 0, 82, 22, 9, 5, 13, 11, 3, 94, 35, 3, 0, 0, 0, 1, 16, 97]"),(9776,"[10, 3, 8, 5, 48, 26, 5, 16, 17, 0, 0, 2, 132, 53, 1, 16, 112, 6, 0, 0, 7, 2, 1, 48, 48, 15, 18, 31, 3, 0, 0, 9, 6, 10, 19, 27, 50, 46, 17, 9, 18, 1, 4, 48, 132, 23, 3, 5, 132, 9, 4, 3, 11, 0, 2, 46, 84, 12, 10, 10, 1, 0, 12, 76, 26, 22, 16, 26, 35, 15, 3, 16, 15, 1, 51, 132, 125, 8, 1, 2, 132, 51, 67, 91, 8, 0, 0, 30, 126, 39, 32, 38, 4, 0, 1, 12, 24, 2, 2, 2, 4, 7, 2, 19, 93, 19, 70, 92, 2, 3, 1, 21, 36, 58, 132, 94, 0, 0, 0, 0, 21, 25, 57, 48, 1, 0, 0, 1]"); 238 insert into vector_01 values(34, " [16, 15, 0, 0, 5, 46, 5, 5, 4, 0, 0, 0, 28, 118, 12, 5, 75, 44, 5, 0, 6, 32, 6, 49, 41, 74, 9, 1, 0, 0, 0, 9, 1, 9, 16, 41, 71, 80, 3, 0, 0, 4, 3, 5, 51, 106, 11, 3, 112, 28, 13, 1, 4, 8, 3, 104, 118, 14, 1, 1, 0, 0, 0, 88, 3, 27, 46, 118, 108, 49, 2, 0, 1, 46, 118, 118, 27, 12, 0, 0, 33, 118, 118, 8, 0, 0, 0, 4, 118, 95, 40, 0, 0, 0, 1, 11, 27, 38, 12, 12, 18, 29, 3, 2, 13, 30, 94, 78, 30, 19, 9, 3, 31, 45, 70, 42, 15, 1, 3, 12, 14, 22, 16, 2, 3, 17, 24, 13]"),(102,"[41, 0, 0, 7, 1, 1, 20, 67, 9, 0, 0, 0, 0, 31, 120, 61, 25, 0, 0, 0, 0, 10, 120, 90, 32, 0, 0, 1, 13, 11, 22, 50, 4, 0, 2, 93, 40, 15, 37, 18, 12, 2, 2, 19, 8, 44, 120, 25, 120, 5, 0, 0, 0, 2, 48, 97, 102, 14, 3, 3, 11, 9, 34, 41, 0, 0, 4, 120, 56, 3, 4, 5, 6, 15, 37, 116, 28, 0, 0, 3, 120, 120, 24, 6, 2, 0, 1, 28, 53, 90, 51, 11, 11, 2, 12, 14, 8, 6, 4, 30, 9, 1, 4, 22, 25, 79, 120, 66, 5, 0, 0, 6, 42, 120, 91, 43, 15, 2, 4, 39, 12, 9, 9, 12, 15, 5, 24, 36]"); 239 select subvector(c2,20,5) from vector_01; 240 select subvector(c2,120) as sv from vector_01; 241 select subvector(c2,-120) from vector_01; 242 select subvector(c2,-120,2) from vector_01; 243 select subvector(c2,-129,2) from vector_01; 244 select subvector(c2,4,-5) from vector_01; 245 select subvector(c2,NULL,5) from vector_01; 246 select subvector(c2,8,"a") from vector_01; 247 select subvector(c2,NULL,NULL) from vector_01; 248 select subvector(c2,c1,5) from vector_01; 249 select subvector(c2,50,c1) from vector_01; 250 select subvector(c2,50,cast("4" as int)) from vector_01 where c1>80; 251 252 select subvector(c2,50,cast("4" as int)),subvector(c2,50,cast("4" as int))*3.5 from vector_01 where c1>80; 253 select subvector(c2,50,5),subvector(c2,50,5) + cast("[4.0,0.82,0.09,3.8,2.98]" as vecf32(5)) from vector_01; 254 255 -- Vector & Scalar Arithemetic 256