github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/vector/vector_func.result (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 insert into vtab32(vecf32_3,vecf32_5) values("[0.8166459,NULL,0.4886152]",NULL); 4 internal error: error while casting NULL to FLOAT 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 internal error: malformed vector input: 0.1726299,3.29088557,30.4330937 9 insert into vtab32(vecf32_3,vecf32_5) values ("[0.1726299,3.29088557,30.4330937]","[0.45052445,2.19845265,9.579752,123.48039162,4635.89423394]"); 10 insert into vtab32(vecf32_3,vecf32_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 11 insert into vtab64(vecf64_3,vecf64_5) values("[0.8166459,NULL,0.4886152]",NULL); 12 internal error: error while casting NULL to DOUBLE 13 insert into vtab64(vecf64_3,vecf64_5) values(NULL,NULL); 14 insert into vtab64(vecf64_3,vecf64_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 15 insert into vtab64(vecf64_3,vecf64_5) values ("[8.5606893,6.7903588,821.977768]","[0.46323407,23.49801546,563.9229458,56.07673508,8732.9583881]"); 16 insert into vtab64(vecf64_3,vecf64_5) values ("[0.9260021,0.26637346,0.06567037]","[0.45756745,65.2996871,321.623636,3.60082066,87.58445764]"); 17 select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32; 18 summation(vecf32_3) summation(vecf32_5) 19 null null 20 1.9714266657829285 null 21 33.89660960435867 4771.603164553642 22 837.3288311958313 9376.918968319893 23 select SUMMATION(vecf64_3),SUMMATION(vecf64_5) from vtab64; 24 summation(vecf64_3) summation(vecf64_5) 25 null null 26 1.9714266299999998 null 27 837.3288160999999 9376.91931851 28 1.2580459300000002 478.56616885 29 select SUMMATION("[0.45052445,2.19845265,9.579752]"); 30 summation([0.45052445,2.19845265,9.579752]) 31 12.228729128837585 32 select SUMMATION(1); 33 invalid argument function summation, bad value [BIGINT] 34 select SUMMATION(NULL); 35 summation(null) 36 null 37 select id, SUMMATION(vecf32_3) from vtab32 group by id order by id; 38 SQL syntax error: column "vtab32.vecf32_3" must appear in the GROUP BY clause or be used in an aggregate function 39 select id, count(vecf32_3) from vtab32 group by id having id > 1 order by id ; 40 id count(vecf32_3) 41 2 1 42 3 1 43 4 1 44 select count(*), SUMMATION(vecf32_3) from vtab32 group by SUMMATION(vecf32_3) Having SUMMATION(vecf32_3) > 33.89660960435867 order by SUMMATION(vecf32_3) desc ; 45 count(*) summation(vecf32_3) 46 1 837.3288311958313 47 select * from vtab32 where SUMMATION(vecf32_3) is null; 48 id vecf32_3 vecf32_5 49 1 null null 50 select * from vtab32 where SUMMATION(vecf32_3) = 33.89660960435867; 51 id vecf32_3 vecf32_5 52 3 [0.1726299, 3.2908857, 30.433094] [0.45052445, 2.1984527, 9.579752, 123.48039, 4635.894] 53 select * from vtab32 where SUMMATION(vecf32_3) > 33.89660960435867; 54 id vecf32_3 vecf32_5 55 4 [8.560689, 6.790359, 821.9778] [0.46323407, 23.498016, 563.923, 56.076736, 8732.958] 56 select distinct(SUMMATION(vecf32_3)) from vtab32; 57 summation(vecf32_3) 58 null 59 1.9714266657829285 60 33.89660960435867 61 837.3288311958313 62 select sum(SUMMATION(vecf32_3)) from vtab32; 63 sum(summation(vecf32_3)) 64 873.1968674659729 65 select min(SUMMATION(vecf32_3)) from vtab32; 66 min(summation(vecf32_3)) 67 1.9714266657829285 68 select max(SUMMATION(vecf32_3)) from vtab32; 69 max(summation(vecf32_3)) 70 837.3288311958313 71 select avg(SUMMATION(vecf32_3)) from vtab32; 72 avg(summation(vecf32_3)) 73 291.06562248865765 74 select count(SUMMATION(vecf32_3)) from vtab32; 75 count(summation(vecf32_3)) 76 3 77 select abs(SUMMATION(vecf64_3)) from vtab64; 78 abs(summation(vecf64_3)) 79 null 80 1.9714266299999998 81 837.3288160999999 82 1.2580459300000002 83 select atan(SUMMATION(vecf64_3)) from vtab64; 84 atan(summation(vecf64_3)) 85 null 86 1.1013680380480793 87 1.569602053403915 88 0.8991829741544897 89 select SUMMATION(vecf32_3) - SUMMATION(vecf32_5) from vtab32; 90 summation(vecf32_3) - summation(vecf32_5) 91 null 92 null 93 -4737.706554949284 94 -8539.590137124062 95 select SUMMATION(vecf32_3) * SUMMATION(vecf32_5) from vtab32; 96 summation(vecf32_3) * summation(vecf32_5) 97 null 98 null 99 161741.16965579722 100 7851564.599961316 101 select SUMMATION(vecf64_3) + SUMMATION(vecf64_5) from vtab64; 102 summation(vecf64_3) + summation(vecf64_5) 103 null 104 null 105 10214.24813461 106 479.82421478 107 select SUMMATION(vecf64_3) / SUMMATION(vecf64_5) from vtab64; 108 summation(vecf64_3) / summation(vecf64_5) 109 null 110 null 111 0.0892967922254718 112 0.0026287815810781172 113 select * from (select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32); 114 summation(vecf32_3) summation(vecf32_5) 115 null null 116 1.9714266657829285 null 117 33.89660960435867 4771.603164553642 118 837.3288311958313 9376.918968319893 119 select SUMMATION(vecf64_3),SUMMATION(vecf64_5) from (select * from vtab64); 120 summation(vecf64_3) summation(vecf64_5) 121 null null 122 1.9714266299999998 null 123 837.3288160999999 9376.91931851 124 1.2580459300000002 478.56616885 125 WITH qn AS (select SUMMATION(vecf32_3),SUMMATION(vecf32_5) from vtab32) SELECT * FROM qn; 126 summation(vtab32.vecf32_3) summation(vtab32.vecf32_5) 127 null null 128 1.9714266657829285 null 129 33.89660960435867 4771.603164553642 130 837.3288311958313 9376.918968319893 131 select inner_product(vecf32_3,"[1,1,1]") from vtab32; 132 inner_product(vecf32_3, [1,1,1]) 133 null 134 1.9714266657829285 135 33.89660960435867 136 837.3288311958313 137 select inner_product(vecf32_3,"[0,0,-1]") from vtab32; 138 inner_product(vecf32_3, [0,0,-1]) 139 null 140 -0.4886152148246765 141 -30.433094024658203 142 -821.977783203125 143 select inner_product(vecf32_3,vecf32_3), inner_product(vecf32_5,vecf32_5) from vtab32; 144 inner_product(vecf32_3, vecf32_3) inner_product(vecf32_5, vecf32_5) 145 null null 146 1.3494319015309593 null 147 937.0329415976587 2.1506857792768624E7 148 675766.8704508307 7.658626165813679E7 149 select inner_product(vecf64_3,vecf64_3), inner_product(vecf64_5,vecf64_5) from vtab64; 150 inner_product(vecf64_3, vecf64_3) inner_product(vecf64_5, vecf64_5) 151 null null 152 1.349431853018031 null 153 675766.8454601857 7.65862682686195E7 154 0.9327473068927187 115390.02486670813 155 select inner_product("[0.45052445,2.19845265,9.579752]","[1,1,1]"); 156 inner_product([0.45052445,2.19845265,9.579752], [1,1,1]) 157 12.228729128837585 158 select inner_product(1,1); 159 invalid argument function inner_product, bad value [BIGINT BIGINT] 160 select inner_product(NULL,NULL); 161 inner_product(null, null) 162 null 163 select id, inner_product(vecf32_3,vecf32_3) from vtab32 group by id order by id; 164 SQL syntax error: column "vtab32.vecf32_3" must appear in the GROUP BY clause or be used in an aggregate function 165 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 ; 166 count(*) inner_product(vecf32_3, vecf32_3) 167 1 675766.8704508307 168 select * from vtab32 where inner_product(vecf32_3,vecf32_3) is null; 169 id vecf32_3 vecf32_5 170 1 null null 171 select * from vtab32 where inner_product(vecf32_3,vecf32_3) = 675766.8704508307; 172 id vecf32_3 vecf32_5 173 4 [8.560689, 6.790359, 821.9778] [0.46323407, 23.498016, 563.923, 56.076736, 8732.958] 174 select * from vtab32 where inner_product(vecf32_3,vecf32_3) <= 1.3494319015309593; 175 id vecf32_3 vecf32_5 176 2 [0.8166459, 0.66616553, 0.4886152] null 177 select distinct(inner_product(vecf32_3,vecf32_3)) from vtab32; 178 inner_product(vecf32_3, vecf32_3) 179 null 180 1.3494319015309593 181 937.0329415976587 182 675766.8704508307 183 select sum(inner_product(vecf32_3,vecf32_3)) from vtab32; 184 sum(inner_product(vecf32_3, vecf32_3)) 185 676705.2528243299 186 select min(inner_product(vecf32_5,vecf32_5)) from vtab32; 187 min(inner_product(vecf32_5, vecf32_5)) 188 2.1506857792768624E7 189 select max(inner_product(vecf32_3,vecf32_3)) from vtab32; 190 max(inner_product(vecf32_3, vecf32_3)) 191 675766.8704508307 192 select avg(inner_product(vecf32_5,vecf32_5)) from vtab32; 193 avg(inner_product(vecf32_5, vecf32_5)) 194 4.9046559725452706E7 195 select count(inner_product(vecf32_5,vecf32_5)) from vtab32; 196 count(inner_product(vecf32_5, vecf32_5)) 197 2 198 select sin(inner_product(vecf64_3,vecf64_3)) from vtab64; 199 sin(inner_product(vecf64_3, vecf64_3)) 200 null 201 0.9755987723676985 202 -0.7452402411356782 203 0.8032593470483471 204 select cos(inner_product(vecf64_5,vecf64_5)) from vtab64; 205 cos(inner_product(vecf64_5, vecf64_5)) 206 null 207 null 208 0.4932042277813813 209 0.7817683693215783 210 select inner_product(vecf32_3,vecf32_3) - inner_product(vecf32_5,vecf32_5) from vtab32; 211 inner_product(vecf32_3, vecf32_3) - inner_product(vecf32_5, vecf32_5) 212 null 213 null 214 -2.1505920759827025E7 215 -7.591049478768596E7 216 select inner_product(vecf32_3,vecf32_3) * inner_product(vecf32_5,vecf32_5) from vtab32; 217 inner_product(vecf32_3, vecf32_3) * inner_product(vecf32_5, vecf32_5) 218 null 219 null 220 2.0152634222080513E10 221 5.175445836024754E13 222 select inner_product(vecf64_3,vecf64_3) + inner_product(vecf64_5,vecf64_5) from vtab64; 223 inner_product(vecf64_3, vecf64_3) + inner_product(vecf64_5, vecf64_5) 224 null 225 null 226 7.726203511407968E7 227 115390.95761401503 228 select inner_product(vecf64_3,vecf64_3) / inner_product(vecf64_5,vecf64_5) from vtab64; 229 inner_product(vecf64_3, vecf64_3) / inner_product(vecf64_5, vecf64_5) 230 null 231 null 232 0.008823603248169682 233 8.083431024216991E-6 234 select * from (select inner_product(vecf32_3,vecf32_3),inner_product(vecf32_5,vecf32_5) from vtab32); 235 inner_product(vecf32_3, vecf32_3) inner_product(vecf32_5, vecf32_5) 236 null null 237 1.3494319015309593 null 238 937.0329415976587 2.1506857792768624E7 239 675766.8704508307 7.658626165813679E7 240 select inner_product(vecf64_3,vecf64_3), inner_product(vecf64_5,vecf64_5) from (select * from vtab64); 241 inner_product(vecf64_3, vecf64_3) inner_product(vecf64_5, vecf64_5) 242 null null 243 1.349431853018031 null 244 675766.8454601857 7.65862682686195E7 245 0.9327473068927187 115390.02486670813 246 WITH qn AS (select inner_product(vecf32_3,vecf32_3),inner_product(vecf32_5,vecf32_5) from vtab32) SELECT * FROM qn; 247 inner_product(vtab32.vecf32_3, vtab32.vecf32_3) inner_product(vtab32.vecf32_5, vtab32.vecf32_5) 248 null null 249 1.3494319015309593 null 250 937.0329415976587 2.1506857792768624E7 251 675766.8704508307 7.658626165813679E7 252 select l1_norm(vecf32_3), l1_norm(vecf32_5) from vtab32; 253 l1_norm(vecf32_3) l1_norm(vecf32_5) 254 null null 255 1.9714266657829285 null 256 33.89660960435867 4771.603164553642 257 837.3288311958313 9376.918968319893 258 select l1_norm(vecf64_3), l1_norm(vecf64_5) from vtab64; 259 l1_norm(vecf64_3) l1_norm(vecf64_5) 260 null null 261 1.9714266299999998 null 262 837.3288160999999 9376.91931851 263 1.2580459300000002 478.56616885 264 select l1_norm(vecf64_3 - vecf32_3),l1_norm(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 265 l1_norm(vecf64_3 - vecf32_3) l1_norm(vecf64_5 - vecf32_5) 266 null null 267 3.578292839812036E-8 null 268 803.4322064956413 4740.123468708467 269 836.0707852658313 8981.95614095505 270 select l1_norm(NULL); 271 l1_norm(null) 272 null 273 select l1_norm(1); 274 invalid argument function l1_norm, bad value [BIGINT] 275 select l1_norm("[1,2,3]"); 276 l1_norm([1,2,3]) 277 6.0 278 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 ; 279 count(*) l1_norm(vecf32_3) 280 1 837.3288311958313 281 1 33.89660960435867 282 select * from vtab32 where l1_norm(vecf32_3) is null; 283 id vecf32_3 vecf32_5 284 1 null null 285 select * from vtab32 where l1_norm(vecf32_3) = 1.9714266657829285; 286 id vecf32_3 vecf32_5 287 2 [0.8166459, 0.66616553, 0.4886152] null 288 select * from vtab32 where l1_norm(vecf32_3) > 1.9714266657829285; 289 id vecf32_3 vecf32_5 290 3 [0.1726299, 3.2908857, 30.433094] [0.45052445, 2.1984527, 9.579752, 123.48039, 4635.894] 291 4 [8.560689, 6.790359, 821.9778] [0.46323407, 23.498016, 563.923, 56.076736, 8732.958] 292 select distinct(l1_norm(vecf32_3)) from vtab32; 293 l1_norm(vecf32_3) 294 null 295 1.9714266657829285 296 33.89660960435867 297 837.3288311958313 298 select sum(l1_norm(vecf32_3)) from vtab32; 299 sum(l1_norm(vecf32_3)) 300 873.1968674659729 301 select min(l1_norm(vecf32_3)) from vtab32; 302 min(l1_norm(vecf32_3)) 303 1.9714266657829285 304 select max(l1_norm(vecf32_3)) from vtab32; 305 max(l1_norm(vecf32_3)) 306 837.3288311958313 307 select avg(l1_norm(vecf32_3)) from vtab32; 308 avg(l1_norm(vecf32_3)) 309 291.06562248865765 310 select count(l1_norm(vecf32_3)) from vtab32; 311 count(l1_norm(vecf32_3)) 312 3 313 select abs(l1_norm(vecf64_3)) from vtab64; 314 abs(l1_norm(vecf64_3)) 315 null 316 1.9714266299999998 317 837.3288160999999 318 1.2580459300000002 319 select atan(l1_norm(vecf64_3)) from vtab64; 320 atan(l1_norm(vecf64_3)) 321 null 322 1.1013680380480793 323 1.569602053403915 324 0.8991829741544897 325 select l1_norm(vecf32_3) - l1_norm(vecf32_5) from vtab32; 326 l1_norm(vecf32_3) - l1_norm(vecf32_5) 327 null 328 null 329 -4737.706554949284 330 -8539.590137124062 331 select l1_norm(vecf32_3) * l1_norm(vecf32_5) from vtab32; 332 l1_norm(vecf32_3) * l1_norm(vecf32_5) 333 null 334 null 335 161741.16965579722 336 7851564.599961316 337 select l1_norm(vecf64_3) + l1_norm(vecf64_5) from vtab64; 338 l1_norm(vecf64_3) + l1_norm(vecf64_5) 339 null 340 null 341 10214.24813461 342 479.82421478 343 select l1_norm(vecf64_3) / l1_norm(vecf64_5) from vtab64; 344 l1_norm(vecf64_3) / l1_norm(vecf64_5) 345 null 346 null 347 0.0892967922254718 348 0.0026287815810781172 349 select * from (select l1_norm(vecf32_3),l1_norm(vecf32_5) from vtab32); 350 l1_norm(vecf32_3) l1_norm(vecf32_5) 351 null null 352 1.9714266657829285 null 353 33.89660960435867 4771.603164553642 354 837.3288311958313 9376.918968319893 355 select l1_norm(vecf64_3),l1_norm(vecf64_5) from (select * from vtab64); 356 l1_norm(vecf64_3) l1_norm(vecf64_5) 357 null null 358 1.9714266299999998 null 359 837.3288160999999 9376.91931851 360 1.2580459300000002 478.56616885 361 WITH qn AS (select l1_norm(vecf32_3),l1_norm(vecf32_5) from vtab32) SELECT * FROM qn; 362 l1_norm(vtab32.vecf32_3) l1_norm(vtab32.vecf32_5) 363 null null 364 1.9714266657829285 null 365 33.89660960435867 4771.603164553642 366 837.3288311958313 9376.918968319893 367 select l2_norm(vecf32_3), l2_norm(vecf32_5) from vtab32; 368 l2_norm(vecf32_3) l2_norm(vecf32_5) 369 null null 370 1.1616505074810406 null 371 30.610993802842444 4637.5486836009195 372 822.0504062713129 8751.35770370157 373 select l2_norm(vecf64_3), l2_norm(vecf64_5) from vtab64; 374 l2_norm(vecf64_3) l2_norm(vecf64_5) 375 null null 376 1.1616504866000061 null 377 822.0503910711227 8751.358081384826 378 0.9657884379576712 339.6910726920979 379 select l2_norm(vecf64_3 - vecf32_3),l1_norm(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 380 l2_norm(vecf64_3 - vecf32_3) l1_norm(vecf64_5 - vecf32_5) 381 null null 382 2.512723280326279E-8 null 383 791.596852413789 4740.123468708467 384 821.9734618909799 8981.95614095505 385 select l2_norm(NULL); 386 l2_norm(null) 387 null 388 select l2_norm(1); 389 invalid argument function l2_norm, bad value [BIGINT] 390 select l2_norm("[1,2,3]"); 391 l2_norm([1,2,3]) 392 3.741657386773941 393 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 ; 394 count(*) l2_norm(vecf32_3) 395 1 822.0504062713129 396 1 30.610993802842444 397 select * from vtab32 where l2_norm(vecf32_3) is null; 398 id vecf32_3 vecf32_5 399 1 null null 400 select * from vtab32 where l2_norm(vecf32_3) = 1.1616505074810406; 401 id vecf32_3 vecf32_5 402 2 [0.8166459, 0.66616553, 0.4886152] null 403 select * from vtab32 where l2_norm(vecf32_3) > 1.1616505074810406; 404 id vecf32_3 vecf32_5 405 3 [0.1726299, 3.2908857, 30.433094] [0.45052445, 2.1984527, 9.579752, 123.48039, 4635.894] 406 4 [8.560689, 6.790359, 821.9778] [0.46323407, 23.498016, 563.923, 56.076736, 8732.958] 407 select distinct(l2_norm(vecf32_3)) from vtab32; 408 l2_norm(vecf32_3) 409 null 410 1.1616505074810406 411 30.610993802842444 412 822.0504062713129 413 select sum(l2_norm(vecf32_3)) from vtab32; 414 sum(l2_norm(vecf32_3)) 415 853.8230505816364 416 select min(l2_norm(vecf32_3)) from vtab32; 417 min(l2_norm(vecf32_3)) 418 1.1616505074810406 419 select max(l2_norm(vecf32_3)) from vtab32; 420 max(l2_norm(vecf32_3)) 421 822.0504062713129 422 select avg(l2_norm(vecf32_3)) from vtab32; 423 avg(l2_norm(vecf32_3)) 424 284.60768352721215 425 select count(l2_norm(vecf32_3)) from vtab32; 426 count(l2_norm(vecf32_3)) 427 3 428 select abs(l2_norm(vecf64_3)) from vtab64; 429 abs(l2_norm(vecf64_3)) 430 null 431 1.1616504866000061 432 822.0503910711227 433 0.9657884379576712 434 select atan(l2_norm(vecf64_3)) from vtab64; 435 atan(l2_norm(vecf64_3)) 436 null 437 0.8600402792611815 438 1.56957985695607 439 0.7679964389815013 440 select l2_norm(vecf32_3) - l2_norm(vecf32_5) from vtab32; 441 l2_norm(vecf32_3) - l2_norm(vecf32_5) 442 null 443 null 444 -4606.937689798077 445 -7929.307297430257 446 select l2_norm(vecf32_3) * l2_norm(vecf32_5) from vtab32; 447 l2_norm(vecf32_3) * l2_norm(vecf32_5) 448 null 449 null 450 141959.97401408787 451 7194057.155753459 452 select l2_norm(vecf64_3) + l2_norm(vecf64_5) from vtab64; 453 l2_norm(vecf64_3) + l2_norm(vecf64_5) 454 null 455 null 456 9573.408472455949 457 340.6568611300556 458 select l2_norm(vecf64_3) / l2_norm(vecf64_5) from vtab64; 459 l2_norm(vecf64_3) / l2_norm(vecf64_5) 460 null 461 null 462 0.0939340366862283 463 0.0028431375317098167 464 select * from (select l2_norm(vecf32_3),l2_norm(vecf32_5) from vtab32); 465 l2_norm(vecf32_3) l2_norm(vecf32_5) 466 null null 467 1.1616505074810406 null 468 30.610993802842444 4637.5486836009195 469 822.0504062713129 8751.35770370157 470 select l2_norm(vecf64_3),l2_norm(vecf64_5) from (select * from vtab64); 471 l2_norm(vecf64_3) l2_norm(vecf64_5) 472 null null 473 1.1616504866000061 null 474 822.0503910711227 8751.358081384826 475 0.9657884379576712 339.6910726920979 476 WITH qn AS (select l2_norm(vecf32_3),l2_norm(vecf32_5) from vtab32) SELECT * FROM qn; 477 l2_norm(vtab32.vecf32_3) l2_norm(vtab32.vecf32_5) 478 null null 479 1.1616505074810406 null 480 30.610993802842444 4637.5486836009195 481 822.0504062713129 8751.35770370157 482 select vector_dims(vecf32_5),vector_dims(vecf32_3) from vtab32; 483 vector_dims(vecf32_5) vector_dims(vecf32_3) 484 null null 485 null 3 486 5 3 487 5 3 488 select vector_dims(vecf64_5),vector_dims(vecf64_3) from vtab64; 489 vector_dims(vecf64_5) vector_dims(vecf64_3) 490 null null 491 null 3 492 5 3 493 5 3 494 select vector_dims(vecf64_3 - vecf32_3),vector_dims(vecf64_5 - vecf32_5) from vtab32 a, vtab64 b where a.id = b.id; 495 vector_dims(vecf64_3 - vecf32_3) vector_dims(vecf64_5 - vecf32_5) 496 null null 497 3 null 498 3 5 499 3 5 500 select vector_dims(NULL); 501 vector_dims(null) 502 null 503 select vector_dims(1); 504 invalid argument function vector_dims, bad value [BIGINT] 505 select vector_dims("[1,2,3]"); 506 vector_dims([1,2,3]) 507 3 508 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 ; 509 count(*) vector_dims(vecf32_3) 510 3 3 511 select * from vtab32 where vector_dims(vecf32_3) is null; 512 id vecf32_3 vecf32_5 513 1 null null 514 select * from vtab32 where vector_dims(vecf32_3) = 3; 515 id vecf32_3 vecf32_5 516 2 [0.8166459, 0.66616553, 0.4886152] null 517 3 [0.1726299, 3.2908857, 30.433094] [0.45052445, 2.1984527, 9.579752, 123.48039, 4635.894] 518 4 [8.560689, 6.790359, 821.9778] [0.46323407, 23.498016, 563.923, 56.076736, 8732.958] 519 select * from vtab32 where vector_dims(vecf32_3) > 3; 520 id vecf32_3 vecf32_5 521 select distinct(vector_dims(vecf32_3)) from vtab32; 522 vector_dims(vecf32_3) 523 null 524 3 525 select sum(vector_dims(vecf32_3)) from vtab32; 526 sum(vector_dims(vecf32_3)) 527 9 528 select min(vector_dims(vecf32_3)) from vtab32; 529 min(vector_dims(vecf32_3)) 530 3 531 select max(vector_dims(vecf32_3)) from vtab32; 532 max(vector_dims(vecf32_3)) 533 3 534 select avg(vector_dims(vecf32_3)) from vtab32; 535 avg(vector_dims(vecf32_3)) 536 3.0 537 select count(vector_dims(vecf32_3)) from vtab32; 538 count(vector_dims(vecf32_3)) 539 3 540 select abs(vector_dims(vecf64_3)) from vtab64; 541 abs(vector_dims(vecf64_3)) 542 null 543 3 544 3 545 3 546 select atan(vector_dims(vecf64_3)) from vtab64; 547 atan(vector_dims(vecf64_3)) 548 null 549 1.2490457723982544 550 1.2490457723982544 551 1.2490457723982544 552 select vector_dims(vecf32_3) - vector_dims(vecf32_5) from vtab32; 553 vector_dims(vecf32_3) - vector_dims(vecf32_5) 554 null 555 null 556 -2 557 -2 558 select vector_dims(vecf32_3) * vector_dims(vecf32_5) from vtab32; 559 vector_dims(vecf32_3) * vector_dims(vecf32_5) 560 null 561 null 562 15 563 15 564 select vector_dims(vecf64_3) + vector_dims(vecf64_5) from vtab64; 565 vector_dims(vecf64_3) + vector_dims(vecf64_5) 566 null 567 null 568 8 569 8 570 select vector_dims(vecf64_3) / vector_dims(vecf64_5) from vtab64; 571 vector_dims(vecf64_3) / vector_dims(vecf64_5) 572 null 573 null 574 0.6 575 0.6 576 select * from (select vector_dims(vecf32_3),vector_dims(vecf32_5) from vtab32); 577 vector_dims(vecf32_3) vector_dims(vecf32_5) 578 null null 579 3 null 580 3 5 581 3 5 582 select vector_dims(vecf64_3),vector_dims(vecf64_5) from (select * from vtab64); 583 vector_dims(vecf64_3) vector_dims(vecf64_5) 584 null null 585 3 null 586 3 5 587 3 5 588 WITH qn AS (select vector_dims(vecf32_3),vector_dims(vecf32_5) from vtab32) SELECT * FROM qn; 589 vector_dims(vtab32.vecf32_3) vector_dims(vtab32.vecf32_5) 590 null null 591 3 null 592 3 5 593 3 5 594 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)); 595 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)); 596 insert into vtab32_1(vecf32_3,vecf32_5) values("[0.8166459,NULL,0.4886152]",NULL); 597 internal error: error while casting NULL to FLOAT 598 insert into vtab32_1(vecf32_3,vecf32_5) values(NULL,NULL); 599 insert into vtab32_1(vecf32_3,vecf32_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 600 insert into vtab32_1(vecf32_3,vecf32_5) values("0.1726299,3.29088557,30.4330937","0.1726299,3.29088557,30.4330937"); 601 internal error: malformed vector input: 0.1726299,3.29088557,30.4330937 602 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]"); 603 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]"); 604 insert into vtab64_1(vecf64_3,vecf64_5) values("[0.8166459,NULL,0.4886152]",NULL); 605 internal error: error while casting NULL to DOUBLE 606 insert into vtab64_1(vecf64_3,vecf64_5) values(NULL,NULL); 607 insert into vtab64_1(vecf64_3,vecf64_5) values("[0.8166459,0.66616553,0.4886152]",NULL); 608 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]"); 609 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]"); 610 update vtab32_1 set `vecf32_3_1` = `vecf32_3` + "[7.326893,10.787382173,21.32132143]"; 611 update vtab32_1 set `vecf32_5_1` = `vecf32_5` + "[7.326893,10.787382173,21.32132143,4.32132,98.321321]"; 612 update vtab64_1 set `vecf64_3_1` = `vecf64_3` + "[32.89849324,1.98392832,192.095843]"; 613 update vtab64_1 set `vecf64_5_1` = `vecf64_5` + "[32.89849324,1.98392832,192.095843,90.321321,23.12312321]"; 614 select cosine_similarity(vecf32_3,"[1,1,1]") from vtab32; 615 cosine_similarity(vecf32_3, [1,1,1]) 616 null 617 0.9798159677522088 618 0.6393198733023462 619 0.5880807580692249 620 select cosine_similarity(vecf32_3,"[0,0,-1]") from vtab32; 621 cosine_similarity(vecf32_3, [0,0,-1]) 622 null 623 -0.4206215308976235 624 -0.9941883697298413 625 -0.9999116561860029 626 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; 627 cosine_similarity(a.vecf32_3, b.vecf64_3) cosine_similarity(a.vecf32_5, b.vecf64_5) 628 null null 629 1.0 null 630 0.9950473019553856 0.9978464646144336 631 0.08025371615184378 0.31888868304136164 632 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; 633 cosine_similarity(b.vecf64_3, a.vecf32_3) cosine_similarity(b.vecf64_5, a.vecf32_5) 634 null null 635 1.0 null 636 0.9950473019553856 0.9978464646144336 637 0.08025371615184378 0.31888868304136164 638 select cosine_similarity("[0.45052445,2.19845265,9.579752]","[1,1,1]"); 639 cosine_similarity([0.45052445,2.19845265,9.579752], [1,1,1]) 640 0.7175720105052915 641 select cosine_similarity(1,1); 642 invalid argument function cosine_similarity, bad value [BIGINT BIGINT] 643 select cosine_similarity(NULL,NULL); 644 cosine_similarity(null, null) 645 null 646 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 ; 647 count(*) cosine_similarity(a.vecf32_3, b.vecf64_3) 648 1 1.0 649 1 0.9950473019553856 650 select cosine_similarity(vecf32_3,vecf32_3_1) from vtab32_1; 651 cosine_similarity(vecf32_3, vecf32_3_1) 652 null 653 0.8273803045865209 654 0.9788139235276682 655 0.999885445357345 656 select cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 657 cosine_similarity(vecf32_5, vecf32_5_1) 658 null 659 null 660 0.9999862289684956 661 0.9999974400338679 662 select cosine_similarity(vecf64_3,vecf64_3_1) from vtab64_1; 663 cosine_similarity(vecf64_3, vecf64_3_1) 664 null 665 0.5432725329691298 666 0.9995364949307252 667 0.23634690466638808 668 select cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 669 cosine_similarity(vecf64_5, vecf64_5_1) 670 null 671 null 672 0.9997062815646757 673 0.9811136124448218 674 select * from vtab32_1 where cosine_similarity(vecf32_3_1,vecf32_3) is null; 675 id vecf32_3 vecf32_3_1 vecf32_5 vecf32_5_1 676 1 null null null null 677 select * from vtab32_1 where cosine_similarity(vecf32_3,vecf32_3_1) = 0.9788139235276682; 678 id vecf32_3 vecf32_3_1 vecf32_5 vecf32_5_1 679 3 [0.1726299, 3.2908857, 30.433094] [7.4995227, 14.078268, 51.754417] [0.45052445, 2.1984527, 9.579752, 123.48039, 4635.894] [7.777417, 12.985835, 30.901073, 127.80171, 4734.2153] 680 select * from vtab32_1 where cosine_similarity(vecf32_3,vecf32_3) <= 0.9788139235276682; 681 id vecf32_3 vecf32_3_1 vecf32_5 vecf32_5_1 682 select distinct(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 683 cosine_similarity(vecf32_3, vecf32_3_1) 684 null 685 0.8273803045865209 686 0.9788139235276682 687 0.999885445357345 688 select sum(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 689 sum(cosine_similarity(vecf32_3, vecf32_3_1)) 690 2.806079673471534 691 select min(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 692 min(cosine_similarity(vecf32_5, vecf32_5_1)) 693 0.9999862289684956 694 select max(cosine_similarity(vecf32_3,vecf32_3_1)) from vtab32_1; 695 max(cosine_similarity(vecf32_3, vecf32_3_1)) 696 0.999885445357345 697 select avg(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 698 avg(cosine_similarity(vecf32_5, vecf32_5_1)) 699 0.9999918345011818 700 select count(cosine_similarity(vecf32_5,vecf32_5_1)) from vtab32_1; 701 count(cosine_similarity(vecf32_5, vecf32_5_1)) 702 2 703 select sin(cosine_similarity(vecf64_3,vecf64_3_1)) from vtab64_1; 704 sin(cosine_similarity(vecf64_3, vecf64_3_1)) 705 null 706 0.5169401135206989 707 0.8412204615696248 708 0.23415265801455926 709 select cos(cosine_similarity(vecf64_5,vecf64_5_1)) from vtab64_1; 710 cos(cosine_similarity(vecf64_5, vecf64_5_1)) 711 null 712 null 713 0.5405494380995346 714 0.5560973493593069 715 select cosine_similarity(vecf32_3,vecf32_3_1) - cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 716 cosine_similarity(vecf32_3, vecf32_3_1) - cosine_similarity(vecf32_5, vecf32_5_1) 717 null 718 null 719 -0.021172305440827488 720 -1.1199467652289741E-4 721 select cosine_similarity(vecf32_3,vecf32_3_1) * cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1; 722 cosine_similarity(vecf32_3, vecf32_3_1) * cosine_similarity(vecf32_5, vecf32_5_1) 723 null 724 null 725 0.9788004442502903 726 0.9998828856844689 727 select cosine_similarity(vecf64_3,vecf64_3_1) + cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 728 cosine_similarity(vecf64_3, vecf64_3_1) + cosine_similarity(vecf64_5, vecf64_5_1) 729 null 730 null 731 1.9992427764954008 732 1.2174605171112098 733 select cosine_similarity(vecf64_3,vecf64_3_1) / cosine_similarity(vecf64_5,vecf64_5_1) from vtab64_1; 734 cosine_similarity(vecf64_3, vecf64_3_1) / cosine_similarity(vecf64_5, vecf64_5_1) 735 null 736 null 737 0.9998301634819331 738 0.2408965706605975 739 select * from (select cosine_similarity(vecf32_3,vecf32_3_1),cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1); 740 cosine_similarity(vecf32_3, vecf32_3_1) cosine_similarity(vecf32_5, vecf32_5_1) 741 null null 742 0.8273803045865209 null 743 0.9788139235276682 0.9999862289684956 744 0.999885445357345 0.9999974400338679 745 select cosine_similarity(vecf64_3,vecf64_3_1), cosine_similarity(vecf64_5,vecf64_5_1) from (select * from vtab64_1); 746 cosine_similarity(vecf64_3, vecf64_3_1) cosine_similarity(vecf64_5, vecf64_5_1) 747 null null 748 0.5432725329691298 null 749 0.9995364949307252 0.9997062815646757 750 0.23634690466638808 0.9811136124448218 751 WITH qn AS (select cosine_similarity(vecf32_3,vecf32_3_1),cosine_similarity(vecf32_5,vecf32_5_1) from vtab32_1) SELECT * FROM qn; 752 cosine_similarity(vtab32_1.vecf32_3, vtab32_1.vecf32_3_1) cosine_similarity(vtab32_1.vecf32_5, vtab32_1.vecf32_5_1) 753 null null 754 0.8273803045865209 null 755 0.9788139235276682 0.9999862289684956 756 0.999885445357345 0.9999974400338679 757 select cosine_similarity(vecf32_3,vecf32_3), cosine_similarity(vecf32_5,vecf32_5) from vtab32; 758 cosine_similarity(vecf32_3, vecf32_3) cosine_similarity(vecf32_5, vecf32_5) 759 null null 760 1.0 null 761 1.0 1.0 762 1.0 1.0 763 select cosine_similarity(vecf64_3,vecf64_3), cosine_similarity(vecf64_5,vecf64_5) from vtab64; 764 cosine_similarity(vecf64_3, vecf64_3) cosine_similarity(vecf64_5, vecf64_5) 765 null null 766 1.0 null 767 1.0 1.0 768 1.0 1.0 769 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",-1) as sv ; 770 sv 771 [0] 772 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",4) ; 773 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 4) 774 [0, 5, 46, 5, 5, 4, 0] 775 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",9) ; 776 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 9) 777 [4, 0] 778 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",10) ; 779 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 10) 780 [0] 781 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",0) ; 782 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 0) 783 [] 784 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",1) ; 785 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 1) 786 [16, 15, 0, 0, 5, 46, 5, 5, 4, 0] 787 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",NULL) ; 788 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], null) 789 null 790 select subvector(NULL,4); 791 subvector(null, 4) 792 null 793 select subvector(NULL,NULL); 794 subvector(null, null) 795 null 796 select subvector("abc",4); 797 internal error: malformed vector input: abc 798 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",3.4) ; 799 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 3.4) 800 [0, 0, 5, 46, 5, 5, 4, 0] 801 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,null) ; 802 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 5, null) 803 null 804 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,0) ; 805 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 5, 0) 806 [] 807 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,1) ; 808 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 5, 1) 809 [5] 810 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,3) ; 811 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 5, 3) 812 [5, 46, 5] 813 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",5,10) ; 814 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 5, 10) 815 [5, 46, 5, 5, 4, 0] 816 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,5) ; 817 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 6, 5) 818 [46, 5, 5, 4, 0] 819 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,-2) ; 820 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 6, -2) 821 [] 822 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",6,"3") ; 823 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], 6, 3) 824 [46, 5, 5] 825 select subvector(NULL,3,4); 826 subvector(null, 3, 4) 827 null 828 select subvector("[16, 15, 0, 0, 5, 46, 5, 5, 4, 0]",NULL,4); 829 subvector([16, 15, 0, 0, 5, 46, 5, 5, 4, 0], null, 4) 830 null 831 create table vector_01(c1 int,c2 vecf32(128)); 832 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]"); 833 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]"); 834 select subvector(c2,20,5) from vector_01; 835 subvector(c2, 20, 5) 836 [6, 15, 2, 19, 130] 837 [17, 6, 15, 116, 16] 838 [0, 7, 2, 1, 48] 839 [0, 6, 32, 6, 49] 840 [0, 0, 10, 120, 90] 841 select subvector(c2,120) as sv from vector_01; 842 sv 843 [4, 11, 4, 2, 2, 9, 14, 8, 8] 844 [94, 35, 3, 0, 0, 0, 1, 16, 97] 845 [0, 21, 25, 57, 48, 1, 0, 0, 1] 846 [12, 14, 22, 16, 2, 3, 17, 24, 13] 847 [39, 12, 9, 9, 12, 15, 5, 24, 36] 848 select subvector(c2,-120) from vector_01; 849 subvector(c2, -120) 850 [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] 851 [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] 852 [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] 853 [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] 854 [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] 855 select subvector(c2,-120,2) from vector_01; 856 subvector(c2, -120, 2) 857 [2, 0] 858 [1, 4] 859 [17, 0] 860 [4, 0] 861 [9, 0] 862 select subvector(c2,-129,2) from vector_01; 863 subvector(c2, -129, 2) 864 [] 865 [] 866 [] 867 [] 868 [] 869 select subvector(c2,4,-5) from vector_01; 870 subvector(c2, 4, -5) 871 [] 872 [] 873 [] 874 [] 875 [] 876 select subvector(c2,NULL,5) from vector_01; 877 subvector(c2, null, 5) 878 null 879 null 880 null 881 null 882 null 883 select subvector(c2,8,"a") from vector_01; 884 invalid argument cast to int, bad value a 885 select subvector(c2,NULL,NULL) from vector_01; 886 subvector(c2, null, null) 887 null 888 null 889 null 890 null 891 null 892 select subvector(c2,c1,5) from vector_01; 893 subvector(c2, c1, 5) 894 [0, 1, 25, 27, 10] 895 [0, 0, 3, 13, 42] 896 [] 897 [9, 16, 41, 71, 80] 898 [1, 4, 22, 25, 79] 899 select subvector(c2,50,c1) from vector_01; 900 subvector(c2, 50, c1) 901 [17, 0, 1, 6, 2, 9, 130, 111, 36, 0] 902 [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] 903 [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] 904 [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] 905 [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] 906 select subvector(c2,50,cast("4" as int)) from vector_01 where c1>80; 907 subvector(c2, 50, cast(4 as int)) 908 [9, 4, 3, 11] 909 [5, 0, 0, 0] 910 select subvector(c2,50,cast("4" as int)),subvector(c2,50,cast("4" as int))*3.5 from vector_01 where c1>80; 911 subvector(c2, 50, cast(4 as int)) subvector(c2, 50, cast(4 as int)) * 3.5 912 [9, 4, 3, 11] [31.5, 14, 10.5, 38.5] 913 [5, 0, 0, 0] [17.5, 0, 0, 0] 914 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; 915 subvector(c2, 50, 5) subvector(c2, 50, 5) + cast([4.0,0.82,0.09,3.8,2.98] as vecf32(5)) 916 [17, 0, 1, 6, 2] [21, 0.82, 1.09, 9.8, 4.98] 917 [4, 0, 0, 2, 31] [8, 0.82, 0.09, 5.8, 33.98] 918 [9, 4, 3, 11, 0] [13, 4.82, 3.09, 14.8, 2.98] 919 [28, 13, 1, 4, 8] [32, 13.82, 1.09, 7.8, 10.98] 920 [5, 0, 0, 0, 2] [9, 0.82, 0.09, 3.8, 4.98]