interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / ext / vec1 / test / vec1rotate2.test

42 lines · 930 bytes Raw Blame History
1# 2026-03-14
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11#
12#
13
14source [file join [file dirname [info script]] vec1_common.tcl]
15set testprefix vec1rotate2
16vec1_load db
17
18do_execsql_test 1.0 {
19 CREATE VIRTUAL TABLE v1 USING vec1(v);
20
21 WITH s(i) AS (
22 SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<34000
23 )
24 INSERT INTO v1(rowid, v) SELECT i, random_vector(256) FROM s;
25}
26
27proc progress {percent msg} {
28 puts "${percent}%: $msg"
29}
30db func progress progress
31
32do_test 1.1 {
33 set T [db one {
34 SELECT
35 vec1_train(v, '{codesize:16, opq:1, nopq_round:1, progress:"progress"}')
36 FROM v1
37 }]
38 set {} {}
39} {}
40
41finish_test
42