| 1 |
plugin_register functions/vector |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Memos TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Memos numbers COLUMN_VECTOR Int8 |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
load --table Memos |
| 8 |
[ |
| 9 |
{"_key": "Positive", "numbers": [1, 2, 3, 4, 5]}, |
| 10 |
{"_key": "Even", "numbers": [2, 4, 6, 8, 10]}, |
| 11 |
{"_key": "Nothing"} |
| 12 |
] |
| 13 |
[[0,0.0,0.0],3] |
| 14 |
select Memos --output_columns 'numbers, vector_find(numbers, 4)' |
| 15 |
[ |
| 16 |
[ |
| 17 |
0, |
| 18 |
0.0, |
| 19 |
0.0 |
| 20 |
], |
| 21 |
[ |
| 22 |
[ |
| 23 |
[ |
| 24 |
3 |
| 25 |
], |
| 26 |
[ |
| 27 |
[ |
| 28 |
"numbers", |
| 29 |
"Int8" |
| 30 |
], |
| 31 |
[ |
| 32 |
"vector_find", |
| 33 |
null |
| 34 |
] |
| 35 |
], |
| 36 |
[ |
| 37 |
[ |
| 38 |
1, |
| 39 |
2, |
| 40 |
3, |
| 41 |
4, |
| 42 |
5 |
| 43 |
], |
| 44 |
4 |
| 45 |
], |
| 46 |
[ |
| 47 |
[ |
| 48 |
2, |
| 49 |
4, |
| 50 |
6, |
| 51 |
8, |
| 52 |
10 |
| 53 |
], |
| 54 |
4 |
| 55 |
], |
| 56 |
[ |
| 57 |
[], |
| 58 |
null |
| 59 |
] |
| 60 |
] |
| 61 |
] |
| 62 |
] |