diff --git a/test/distributed/cases/load_data/load_data_parquet.result b/test/distributed/cases/load_data/load_data_parquet.result index a64d133772d4b..803152c697f20 100644 --- a/test/distributed/cases/load_data/load_data_parquet.result +++ b/test/distributed/cases/load_data/load_data_parquet.result @@ -439,4 +439,10 @@ load data infile {'filepath'='$resources/parquet/Iris.parquet', 'format'='parque select count(*) from parquet_01; ➤ count(*)[-5,64,0] 𝄀 150 +drop table if exists parquet_06; +create table parquet_06(PassengerId bigint,Survived bigint, Pclass bigint,Name varchar(50),Sex varchar(50),Age double,SibSp bigint,Parch bigint,Ticket varchar(50),Fare double,Cabin varchar(50),Embarked varchar(50)); +load data infile {'filepath'='$resources/parquet/Titanic.parquet','format'='parquet'} into table parquet_06; +select count(*) from parquet_06; +➤ count(*)[-5,64,0] 𝄀 +891 drop database parq; diff --git a/test/distributed/cases/load_data/load_data_parquet.sql b/test/distributed/cases/load_data/load_data_parquet.sql index 8482762f29512..3f7626dc5dda7 100644 --- a/test/distributed/cases/load_data/load_data_parquet.sql +++ b/test/distributed/cases/load_data/load_data_parquet.sql @@ -323,6 +323,10 @@ CREATE TABLE `parquet_01` ( load data infile {'filepath'='$resources/parquet/Iris.parquet', 'format'='parquet'} into table parquet_01; select count(*) from parquet_01; +drop table if exists parquet_06; +create table parquet_06(PassengerId bigint,Survived bigint, Pclass bigint,Name varchar(50),Sex varchar(50),Age double,SibSp bigint,Parch bigint,Ticket varchar(50),Fare double,Cabin varchar(50),Embarked varchar(50)); +load data infile {'filepath'='$resources/parquet/Titanic.parquet','format'='parquet'} into table parquet_06; +select count(*) from parquet_06; -- post drop database parq; diff --git a/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.result b/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.result index 04d6f2d4c3145..52613f025f573 100644 --- a/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.result +++ b/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.result @@ -10,23 +10,33 @@ insert into src values (0, 'color is red', 't1'), (1, 'car is yellow', 'crazy ca (10, NULL, NULL); create table src2 (id1 varchar, id2 bigint, body char(128), title text, primary key (id1, id2), FULLTEXT ftidx(body, title) ASYNC); insert into src2 values ('id0', 0, 'red', 't1'), ('id1', 1, 'yellow', 't2'), ('id2', 2, 'blue', 't3'), ('id3', 3, 'blue red', 't4'), ('id4', 4, 'bright red null', NULL); -select sleep(20); -sleep(20) -0 select * from src where match(body, title) against('red'); -id body title -0 color is red t1 -3 blue is not red colorful +➤ id[-5,64,0] ¦ body[12,-1,0] ¦ title[12,0,0] 𝄀 +0 ¦ color is red ¦ t1 𝄀 +3 ¦ blue is not red ¦ colorful show create table src; -Table Create Table -src CREATE TABLE `src` (\n `id` bigint NOT NULL,\n `body` varchar(65535) DEFAULT NULL,\n `title` text DEFAULT NULL,\n PRIMARY KEY (`id`),\n FULLTEXT `ftidx`(`body`,`title`) ASYNC\n) +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +src ¦ CREATE TABLE `src` ( + `id` bigint NOT NULL, + `body` varchar(65535) DEFAULT NULL, + `title` text DEFAULT NULL, + PRIMARY KEY (`id`), + FULLTEXT `ftidx`(`body`,`title`) ASYNC +) alter table src rename to src1; select * from src2 where match(body, title) against('red'); -id1 id2 body title -id0 0 red t1 -id3 3 blue red t4 +➤ id1[12,-1,0] ¦ id2[-5,64,0] ¦ body[1,128,0] ¦ title[12,0,0] 𝄀 +id0 ¦ 0 ¦ red ¦ t1 𝄀 +id3 ¦ 3 ¦ blue red ¦ t4 show create table src2; -Table Create Table -src2 CREATE TABLE `src2` (\n `id1` varchar(65535) NOT NULL,\n `id2` bigint NOT NULL,\n `body` char(128) DEFAULT NULL,\n `title` text DEFAULT NULL,\n PRIMARY KEY (`id1`,`id2`),\n FULLTEXT `ftidx`(`body`,`title`) ASYNC\n) +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +src2 ¦ CREATE TABLE `src2` ( + `id1` varchar(65535) NOT NULL, + `id2` bigint NOT NULL, + `body` char(128) DEFAULT NULL, + `title` text DEFAULT NULL, + PRIMARY KEY (`id1`,`id2`), + FULLTEXT `ftidx`(`body`,`title`) ASYNC +) drop table src1; drop table src2; diff --git a/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.sql b/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.sql index 02abd10e7bb2f..bf41990fc24e9 100644 --- a/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.sql +++ b/test/distributed/cases/pessimistic_transaction/fulltext/fulltext_async.sql @@ -19,10 +19,8 @@ create table src2 (id1 varchar, id2 bigint, body char(128), title text, primary insert into src2 values ('id0', 0, 'red', 't1'), ('id1', 1, 'yellow', 't2'), ('id2', 2, 'blue', 't3'), ('id3', 3, 'blue red', 't4'), ('id4', 4, 'bright red null', NULL); --- sleep and wait for src and src2 finish -select sleep(20); - -- select src +-- @wait_expect(1,10) select * from src where match(body, title) against('red'); show create table src; alter table src rename to src1; diff --git a/test/distributed/cases/pessimistic_transaction/isolation_2.result b/test/distributed/cases/pessimistic_transaction/isolation_2.result index 637787b306385..6282d5a6de483 100644 --- a/test/distributed/cases/pessimistic_transaction/isolation_2.result +++ b/test/distributed/cases/pessimistic_transaction/isolation_2.result @@ -281,25 +281,25 @@ vvv 2000-09-08 00:00:00 aaaa 2000-09-02 00:00:00 oppo 1009-11-11 00:00:00 insert into dis_table_02(b,c) values ('','1999-06-04'); +drop database if exists temp_db; +create database temp_db; +use temp_db; create temporary table dis_temp_01(a int,b varchar(100),primary key(a)); - begin ; - insert into dis_temp_01 values (233,'uuuu'); - +use temp_db; select * from dis_temp_01; SQL parser error: table "dis_temp_01" does not exist select * from dis_temp_01; -a b -233 uuuu +➤ a[4,32,0] ¦ b[12,-1,0] 𝄀 +233 ¦ uuuu +use temp_db; truncate table dis_temp_01; -no such table isolation_2.dis_temp_01 +no such table temp_db.dis_temp_01 rollback ; - select * from dis_temp_01; -a b +➤ a[4,32,0] ¦ b[12,-1,0] drop table dis_temp_01; - start transaction; load data infile '$resources/external_table_file/isolation_01.csv' into table dis_table_02 fields terminated by ','; @@ -507,28 +507,21 @@ a b c 6666 kkkk 2010-11-25 00:00:00 879 uuyyy 2011-11-26 00:00:00 begin ; - use isolation_2; - create temporary table dis_table_05(a int,b varchar(25) not null,c datetime,primary key(a),unique key bstr (b),key cdate (c)); - load data infile 'fff.csv' to dis_table_05 fields terminated by ','; -SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 29 near " to dis_table_05;"; +SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 29 near " to dis_table_05 fields terminated by ',';"; use isolation_2; - select * from dis_table_05; SQL parser error: table "dis_table_05" does not exist insert into dis_table_05 values (8900,'kkkk77','1772-04-20'); - commit; - select * from dis_table_05; -a b c -8900 kkkk77 1772-04-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[93,64,0] 𝄀 +8900 ¦ kkkk77 ¦ 1772-04-20 00:00:00 select * from dis_table_05; SQL parser error: table "dis_table_05" does not exist drop table dis_table_05; - use isolation_2; create table dis_table_06(a int auto_increment primary key,b varchar(25),c double default 0.0); insert into dis_table_06(a,b) values(2,'moon'); @@ -538,47 +531,47 @@ use isolation_2; insert into dis_table_06(a,b) values (3,'llllp'); Duplicate entry '3' for key 'a' select * from dis_table_06; -a b c -2 moon 0.0 -3 sun 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 use isolation_2; insert into dis_table_06 values (3,'uuubbb',12.02); Duplicate entry '3' for key 'a' select * from dis_table_06; -a b c -2 moon 0.0 -3 sun 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 insert into dis_table_06(a,b) values (4,'cookie'); commit; select * from dis_table_06; -a b c -2 moon 0.0 -3 sun 0.0 -4 cookie 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 𝄀 +4 ¦ cookie ¦ 0.0 begin; use isolation_2; insert into dis_table_06(a,b) values (5,'leetio'); select * from dis_table_06; -a b c -5 leetio 0.0 -2 moon 0.0 -3 sun 0.0 -4 cookie 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +5 ¦ leetio ¦ 0.0 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 𝄀 +4 ¦ cookie ¦ 0.0 update dis_table_06 set a=5 where b='sun'; Duplicate entry '5' for key 'a' select * from dis_table_06; -a b c -2 moon 0.0 -3 sun 0.0 -4 cookie 0.0 -5 leetio 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 𝄀 +4 ¦ cookie ¦ 0.0 𝄀 +5 ¦ leetio ¦ 0.0 commit; select * from dis_table_06; -a b c -2 moon 0.0 -3 sun 0.0 -4 cookie 0.0 -5 leetio 0.0 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] 𝄀 +2 ¦ moon ¦ 0.0 𝄀 +3 ¦ sun ¦ 0.0 𝄀 +4 ¦ cookie ¦ 0.0 𝄀 +5 ¦ leetio ¦ 0.0 drop table dis_table_06; create table dis_table_07(a int,b varchar(25),c double,d datetime,primary key(a,b,d)); insert into dis_table_07 values (1,'yellow',20.09,'2020-09-27'); @@ -588,36 +581,37 @@ use isolation_2; insert into dis_table_07 values (2,'blue',11.00,'2021-01-20'); Duplicate entry '(2,blue,2021-01-20 00:00:00)' for key '(a,b,d)' select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 commit; select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 insert into dis_table_07 values (2,'blue',12.00,'2024-01-20'); begin; update dis_table_07 set d='2024-01-20' where a=2 and b='blue'; Duplicate entry '(2,blue,2024-01-20 00:00:00)' for key '(a,b,d)' select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 -2 blue 12.0 2024-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 𝄀 +2 ¦ blue ¦ 12.0 ¦ 2024-01-20 00:00:00 select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 -2 blue 12.0 2024-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 𝄀 +2 ¦ blue ¦ 12.0 ¦ 2024-01-20 00:00:00 commit; select * from dis_table_07; -a b c d -1 yellow 20.09 2020-09-27 00:00:00 -2 blue 10.0 2021-01-20 00:00:00 -2 blue 12.0 2024-01-20 00:00:00 +➤ a[4,32,0] ¦ b[12,-1,0] ¦ c[8,54,0] ¦ d[93,64,0] 𝄀 +1 ¦ yellow ¦ 20.09 ¦ 2020-09-27 00:00:00 𝄀 +2 ¦ blue ¦ 10.0 ¦ 2021-01-20 00:00:00 𝄀 +2 ¦ blue ¦ 12.0 ¦ 2024-01-20 00:00:00 drop table dis_table_07; +drop database temp_db; diff --git a/test/distributed/cases/pessimistic_transaction/isolation_2.sql b/test/distributed/cases/pessimistic_transaction/isolation_2.sql index f77a2fbe237a0..351cd2e390c7e 100644 --- a/test/distributed/cases/pessimistic_transaction/isolation_2.sql +++ b/test/distributed/cases/pessimistic_transaction/isolation_2.sql @@ -172,21 +172,24 @@ use dis_db_02; select b,c from dis_table_02; insert into dis_table_02(b,c) values ('','1999-06-04'); ------------------------------ --- @bvt:issue#9124 +drop database if exists temp_db; +create database temp_db; +use temp_db; create temporary table dis_temp_01(a int,b varchar(100),primary key(a)); begin ; insert into dis_temp_01 values (233,'uuuu'); -- @session:id=1{ +use temp_db; select * from dis_temp_01; -- @session} select * from dis_temp_01; -- @session:id=1{ +use temp_db; truncate table dis_temp_01; -- @session} rollback ; select * from dis_temp_01; drop table dis_temp_01; --- @bvt:issue -- @bvt:issue#10585 start transaction; @@ -311,7 +314,6 @@ select * from dis_table_04; -- @session} -- @bvt:issue ---------------------------- --- @bvt:issue#9124 begin ; use isolation_2; create temporary table dis_table_05(a int,b varchar(25) not null,c datetime,primary key(a),unique key bstr (b),key cdate (c)); @@ -327,7 +329,6 @@ select * from dis_table_05; select * from dis_table_05; -- @session} drop table dis_table_05; --- @bvt:issue -- auto_increment 主键冲突 use isolation_2; @@ -387,3 +388,4 @@ select * from dis_table_07; commit; select * from dis_table_07; drop table dis_table_07; +drop database temp_db; diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.result b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.result index a5aa6e38f3c3d..ce41f6b2ad508 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.result +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.result @@ -118,59 +118,53 @@ invalid input: vector ops between different dimensions (128, 9) is not permitted select * from vector_index_07 order by L2_DISTANCE(b, "abc") ASC LIMIT 2; internal error: malformed vector input: abc create table vector_index_08(a bigint auto_increment primary key, b vecf32(128),c int,key c_k(c)); - insert into vector_index_08 values(9774 ,"[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]",3),(9775,"[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]",5),(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]",3); - insert into vector_index_08 values(9777, "[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]",4),(9778,"[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]",4); - create index idx01 using hnsw on vector_index_08(b) op_type "vector_l2_ops"; - select * from vector_index_08 ; -a b c -9774 [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] 3 -9775 [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] 5 -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] 3 -9777 [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] 4 -9778 [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] 4 +➤ a[-5,64,0] ¦ b[12,128,0] ¦ c[4,32,0] 𝄀 +9774 ¦ [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] ¦ 3 𝄀 +9775 ¦ [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] ¦ 5 𝄀 +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] ¦ 3 𝄀 +9777 ¦ [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] ¦ 4 𝄀 +9778 ¦ [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] ¦ 4 update vector_index_08 set b="[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]" where a=9774; - select * from vector_index_08 where a=9774; -a b c -9774 [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] 3 +➤ a[-5,64,0] ¦ b[12,128,0] ¦ c[4,32,0] 𝄀 +9774 ¦ [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] ¦ 3 delete from vector_index_08 where a=9777; - select * from vector_index_08 where a=9777; -a b c +➤ a[-5,64,0] ¦ b[12,128,0] ¦ c[4,32,0] truncate table vector_index_08; - select * from vector_index_08; -a b c +➤ a[-5,64,0] ¦ b[12,128,0] ¦ c[4,32,0] insert into vector_index_08 values(9774 ,"[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]",3),(9775,"[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]",5),(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]",3); - alter table vector_index_08 add column d vecf32(3) not null after c; - create index idx02 using hnsw on vector_index_08(d) op_type "vector_l2_ops"; - show create table vector_index_08; -Table Create Table -vector_index_08 CREATE TABLE `vector_index_08` (\n `a` bigint NOT NULL AUTO_INCREMENT,\n `b` vecf32(128) DEFAULT NULL,\n `c` int DEFAULT NULL,\n `d` vecf32(3) NOT NULL,\n PRIMARY KEY (`a`),\n KEY `c_k` (`c`),\n KEY `idx01` USING hnsw (`b`) op_type 'vector_l2_ops' ,\n KEY `idx02` USING hnsw (`d`) op_type 'vector_l2_ops' \n) +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +vector_index_08 ¦ CREATE TABLE `vector_index_08` ( + `a` bigint NOT NULL AUTO_INCREMENT, + `b` vecf32(128) DEFAULT NULL, + `c` int DEFAULT NULL, + `d` vecf32(3) NOT NULL, + PRIMARY KEY (`a`), + KEY `c_k` (`c`), + KEY `idx01` USING hnsw (`b`) op_type 'vector_l2_ops' , + KEY `idx02` USING hnsw (`d`) op_type 'vector_l2_ops' +) insert into vector_index_08(d) values ("[2.36,5.021,9.222]"); - insert into vector_index_08(d) values ("[8.555,2.11,7.22]"); - alter table vector_index_08 rename column d to e; - alter table vector_index_08 drop column e; - select * from vector_index_08; -a b c -9774 [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] 3 -9775 [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] 5 -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] 3 -9777 null null -9778 null null +➤ a[-5,64,0] ¦ b[12,128,0] ¦ c[4,32,0] 𝄀 +9774 ¦ [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] ¦ 3 𝄀 +9775 ¦ [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] ¦ 5 𝄀 +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] ¦ 3 𝄀 +9777 ¦ null ¦ null 𝄀 +9778 ¦ null ¦ null drop table vector_index_08; - create table vector_index_09(a bigint primary key, b vecf32(128),c int,key c_k(c)); create index idx01 using hnsw on vector_index_09(b) op_type "vector_l2_ops"; insert into vector_index_09 values(9774 ,NULL,3),(9775,NULL,10); diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.sql b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.sql index 5ea2f31e9c77b..6d979b18924c4 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.sql +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw.sql @@ -107,7 +107,6 @@ select * from vector_index_07 order by L2_DISTANCE(a, "[16, 15, 0, 0, 5, 46, 5, select * from vector_index_07 order by L2_DISTANCE(b, "[16, 15, 3, 0, 0, 4, 3, 5, 51]") ASC LIMIT 2; select * from vector_index_07 order by L2_DISTANCE(b, "abc") ASC LIMIT 2; --- @bvt:issue#22794 -- potential w-w conflict because of async task like reindex and drop column -- vector index: update/delete/truncate vector index @@ -143,7 +142,6 @@ select * from vector_index_08; drop table vector_index_08; --- @bvt:issue -- create vector index on NULL values create table vector_index_09(a bigint primary key, b vecf32(128),c int,key c_k(c)); diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.result b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.result index d8e1e090215d6..3d407189af3c3 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.result +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.result @@ -8,9 +8,6 @@ insert into t1 values (0, "[1,2,3]", 1); UPDATE t1 set b = '[4,5,6]' where a = 0; insert into t1 values (1, "[2,3,4]", 1); DELETE FROM t1 WHERE a=1; -select sleep(15); -sleep(15) -0 select * from t1 order by L2_DISTANCE(b,"[1,2,3]") ASC LIMIT 10; a b c 0 [4, 5, 6] 1 @@ -25,11 +22,8 @@ create table t2(a bigint primary key, b vecf32(128)); create index idx2 using hnsw on t2(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table t2 fields terminated by ':' parallel 'true'; select count(*) from t2; -count(*) +➤ count(*)[-5,64,0] 𝄀 10000 -select sleep(20); -sleep(20) -0 select * from t2 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; a b 9999 [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] @@ -38,29 +32,26 @@ a b 0 [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] drop table t2; create table t3(a bigint primary key, b vecf32(128)); - load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; - select count(*) from t3; - +➤ count(*)[-5,64,0] 𝄀 +10000 create index idx3 using hnsw on t3(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; - -select sleep(10); - load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; - select count(*) from t3; - -select sleep(20); - +➤ count(*)[-5,64,0] 𝄀 +20000 select * from t3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +9999 ¦ [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] select * from t3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +0 ¦ [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] select * from t3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +10000 ¦ [59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18] select * from t3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +19999 ¦ [0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25] drop table t3; - drop database hnsw_cdc; diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql index c77745a21d437..86393a0899f23 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql @@ -24,10 +24,10 @@ insert into t1 values (1, "[2,3,4]", 1); DELETE FROM t1 WHERE a=1; -- select hnsw_cdc_update('hnsw_cdc', 't1', 3, '{"start":"", "end":"", "cdc":[{"t":"D", "pk":0}]}'); -select sleep(15); -- test with multi-cn is tricky. since model is cached in memory, model may not be updated after CDC sync'd. The only way to test is to all INSERT/DELETE/UPDATE before SELECT. -- already update to [4,5,6], result is [4,5,6] +-- @wait_expect(1,20) select * from t1 order by L2_DISTANCE(b,"[1,2,3]") ASC LIMIT 10; -- should return a=0 @@ -41,14 +41,12 @@ drop table t1; -- t2 create table t2(a bigint primary key, b vecf32(128)); create index idx2 using hnsw on t2(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; --- select sleep(10); - +-- @wait_expect(1,11) load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table t2 fields terminated by ':' parallel 'true'; select count(*) from t2; -select sleep(20); - +-- @wait_expect(20,40) select * from t2 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; select * from t2 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; @@ -62,7 +60,6 @@ drop table t2; -- end t2 --- @bvt:issue#22794 -- check load data infile with parallel 'true' will make hnsw indx inconsistent and increase the limit to see more results -- t3 @@ -74,14 +71,12 @@ select count(*) from t3; create index idx3 using hnsw on t3(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; -select sleep(10); - +-- @wait_expect(1,10) load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; select count(*) from t3; -select sleep(20); - +-- @wait_expect(1,20) select * from t3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; select * from t3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; @@ -94,8 +89,5 @@ select * from t3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0 drop table t3; -- end t3 - --- @bvt:issue - drop database hnsw_cdc; diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.result b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.result index 0c18cba685a96..3e688cc318dcc 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.result +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.result @@ -118,13 +118,9 @@ invalid input: vector ops between different dimensions (128, 9) is not permitted select * from vector_index_07 order by L2_DISTANCE(b, "abc") ASC LIMIT 2; internal error: malformed vector input: abc create table vector_index_08(a bigint auto_increment primary key, b vecf64(128),c int,key c_k(c)); - insert into vector_index_08 values(9774 ,"[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]",3),(9775,"[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]",5),(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]",3); - insert into vector_index_08 values(9777, "[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]",4),(9778,"[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]",4); - create index idx01 using hnsw on vector_index_08(b) op_type "vector_l2_ops"; - select * from vector_index_08 ; a b c 9774 [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] 3 @@ -133,35 +129,25 @@ a b c 9777 [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] 4 9778 [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] 4 update vector_index_08 set b="[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]" where a=9774; - select * from vector_index_08 where a=9774; a b c 9774 [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] 3 delete from vector_index_08 where a=9777; - select * from vector_index_08 where a=9777; a b c truncate table vector_index_08; - select * from vector_index_08; a b c insert into vector_index_08 values(9774 ,"[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]",3),(9775,"[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]",5),(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]",3); - alter table vector_index_08 add column d vecf64(3) not null after c; - create index idx02 using hnsw on vector_index_08(d) op_type "vector_l2_ops"; - show create table vector_index_08; Table Create Table vector_index_08 CREATE TABLE `vector_index_08` (\n `a` bigint NOT NULL AUTO_INCREMENT,\n `b` vecf64(128) DEFAULT NULL,\n `c` int DEFAULT NULL,\n `d` vecf64(3) NOT NULL,\n PRIMARY KEY (`a`),\n KEY `c_k` (`c`),\n KEY `idx01` USING hnsw (`b`) op_type 'vector_l2_ops' ,\n KEY `idx02` USING hnsw (`d`) op_type 'vector_l2_ops' \n) insert into vector_index_08(d) values ("[2.36,5.021,9.222]"); - insert into vector_index_08(d) values ("[8.555,2.11,7.22]"); - alter table vector_index_08 rename column d to e; - alter table vector_index_08 drop column e; - select * from vector_index_08; a b c 9774 [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] 3 @@ -170,7 +156,6 @@ a b c 9777 null null 9778 null null drop table vector_index_08; - create table vector_index_09(a bigint primary key, b vecf64(128),c int,key c_k(c)); create index idx01 using hnsw on vector_index_09(b) op_type "vector_l2_ops"; insert into vector_index_09 values(9774 ,NULL,3),(9775,NULL,10); diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.sql b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.sql index d36108e3c95a7..e713c2d40cee6 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.sql +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64.sql @@ -107,7 +107,6 @@ select * from vector_index_07 order by L2_DISTANCE(a, "[16, 15, 0, 0, 5, 46, 5, select * from vector_index_07 order by L2_DISTANCE(b, "[16, 15, 3, 0, 0, 4, 3, 5, 51]") ASC LIMIT 2; select * from vector_index_07 order by L2_DISTANCE(b, "abc") ASC LIMIT 2; --- @bvt:issue#22794 -- potential w-w conflict because of async task like reindex and drop column -- vector index: update/delete/truncate vector index @@ -143,7 +142,6 @@ select * from vector_index_08; drop table vector_index_08; --- @bvt:issue -- create vector index on NULL values create table vector_index_09(a bigint primary key, b vecf64(128),c int,key c_k(c)); diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.result b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.result index 479e163634175..0e7857ce8390d 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.result +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.result @@ -8,59 +8,50 @@ insert into t1 values (0, "[1,2,3]", 1); UPDATE t1 set b = '[4,5,6]' where a = 0; insert into t1 values (1, "[2,3,4]", 1); DELETE FROM t1 WHERE a=1; -select sleep(15); -sleep(15) -0 select * from t1 order by L2_DISTANCE(b,"[1,2,3]") ASC LIMIT 10; -a b c -0 [4, 5, 6] 1 +➤ a[-5,64,0] ¦ b[12,3,0] ¦ c[4,32,0] 𝄀 +0 ¦ [4, 5, 6] ¦ 1 select * from t1 order by L2_DISTANCE(b,"[4,5,6]") ASC LIMIT 10; -a b c -0 [4, 5, 6] 1 +➤ a[-5,64,0] ¦ b[12,3,0] ¦ c[4,32,0] 𝄀 +0 ¦ [4, 5, 6] ¦ 1 select * from t1 order by L2_DISTANCE(b,"[2,3,4]") ASC LIMIT 10; -a b c -0 [4, 5, 6] 1 +➤ a[-5,64,0] ¦ b[12,3,0] ¦ c[4,32,0] 𝄀 +0 ¦ [4, 5, 6] ¦ 1 drop table t1; create table t2(a bigint primary key, b vecf64(128)); create index idx2 using hnsw on t2(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table t2 fields terminated by ':' parallel 'true'; select count(*) from t2; -count(*) +➤ count(*)[-5,64,0] 𝄀 10000 -select sleep(20); -sleep(20) -0 select * from t2 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; -a b -9999 [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +9999 ¦ [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] select * from t2 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; -a b -0 [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +0 ¦ [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] drop table t2; create table t3(a bigint primary key, b vecf64(128)); - load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; - select count(*) from t3; - +➤ count(*)[-5,64,0] 𝄀 +10000 create index idx3 using hnsw on t3(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; - -select sleep(10); - load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; - select count(*) from t3; - -select sleep(20); - +➤ count(*)[-5,64,0] 𝄀 +20000 select * from t3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +9999 ¦ [14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7] select * from t3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +0 ¦ [0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1] select * from t3 order by L2_DISTANCE(b, "[59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +10000 ¦ [59, 0, 0, 1, 1, 1, 5, 100, 41, 0, 0, 4, 57, 34, 31, 115, 4, 0, 0, 12, 30, 33, 43, 85, 21, 0, 0, 14, 25, 9, 10, 60, 99, 11, 0, 0, 0, 0, 10, 55, 68, 1, 0, 3, 115, 65, 42, 115, 32, 3, 0, 4, 13, 21, 104, 115, 81, 15, 15, 23, 9, 2, 21, 75, 43, 20, 1, 0, 10, 2, 2, 20, 52, 35, 32, 61, 79, 8, 7, 41, 50, 106, 96, 20, 8, 2, 11, 39, 115, 48, 53, 11, 3, 0, 2, 43, 35, 11, 0, 1, 13, 7, 0, 1, 115, 58, 54, 29, 1, 2, 0, 3, 32, 115, 99, 34, 1, 0, 0, 0, 35, 15, 52, 44, 9, 0, 0, 18] select * from t3 order by L2_DISTANCE(b, "[0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25]") ASC LIMIT 1; - +➤ a[-5,64,0] ¦ b[12,128,0] 𝄀 +19999 ¦ [0, 0, 0, 0, 0, 101, 82, 4, 2, 0, 0, 0, 3, 133, 133, 8, 46, 1, 2, 13, 15, 29, 87, 50, 22, 1, 0, 16, 25, 6, 18, 49, 5, 2, 0, 2, 3, 59, 70, 19, 18, 2, 0, 11, 42, 37, 30, 13, 133, 13, 4, 53, 28, 3, 8, 42, 77, 6, 11, 103, 36, 0, 0, 32, 7, 15, 59, 27, 2, 0, 2, 5, 14, 5, 55, 52, 51, 3, 2, 5, 133, 21, 10, 38, 26, 1, 0, 64, 71, 3, 10, 118, 53, 5, 6, 28, 33, 26, 73, 15, 0, 0, 0, 22, 13, 15, 133, 133, 4, 0, 0, 15, 107, 62, 46, 91, 9, 1, 7, 16, 28, 4, 0, 27, 33, 4, 15, 25] drop table t3; - drop database hnsw_cdc; diff --git a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.sql b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.sql index 7ad05cd9f250e..a3a91f6e8b813 100644 --- a/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.sql +++ b/test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_f64_async.sql @@ -24,10 +24,10 @@ insert into t1 values (1, "[2,3,4]", 1); DELETE FROM t1 WHERE a=1; -- select hnsw_cdc_update('hnsw_cdc', 't1', 3, '{"start":"", "end":"", "cdc":[{"t":"D", "pk":0}]}'); -select sleep(15); -- test with multi-cn is tricky. since model is cached in memory, model may not be updated after CDC sync'd. The only way to test is to all INSERT/DELETE/UPDATE before SELECT. -- already update to [4,5,6], result is [4,5,6] +-- @wait_expect(20,40) select * from t1 order by L2_DISTANCE(b,"[1,2,3]") ASC LIMIT 10; -- should return a=0 @@ -47,8 +47,7 @@ load data infile {'filepath'='$resources/vector/sift128_base_10k.csv.gz', 'compr select count(*) from t2; -select sleep(20); - +-- @wait_expect(20,40) select * from t2 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; select * from t2 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; @@ -62,7 +61,6 @@ drop table t2; -- end t2 --- @bvt:issue#22794 -- check load data infile with parallel 'true' will make hnsw indx inconsistent and increase the limit to see more results -- t3 @@ -74,14 +72,11 @@ select count(*) from t3; create index idx3 using hnsw on t3(b) op_type "vector_l2_ops" M 64 EF_CONSTRUCTION 200 EF_SEARCH 200 ASYNC; -select sleep(10); - +-- @wait_expect(1,10) load data infile {'filepath'='$resources/vector/sift128_base_10k_2.csv.gz', 'compression'='gzip'} into table t3 fields terminated by ':' parallel 'true'; select count(*) from t3; - -select sleep(20); - +-- @wait_expect(1,20) select * from t3 order by L2_DISTANCE(b, "[14, 2, 0, 0, 0, 2, 42, 55, 9, 1, 0, 0, 18, 100, 77, 32, 89, 1, 0, 0, 19, 85, 15, 68, 52, 4, 0, 0, 0, 0, 2, 28, 34, 13, 5, 12, 49, 40, 39, 37, 24, 2, 0, 0, 34, 83, 88, 28, 119, 20, 0, 0, 41, 39, 13, 62, 119, 16, 2, 0, 0, 0, 10, 42, 9, 46, 82, 79, 64, 19, 2, 5, 10, 35, 26, 53, 84, 32, 34, 9, 119, 119, 21, 3, 3, 11, 17, 14, 119, 25, 8, 5, 0, 0, 11, 22, 23, 17, 42, 49, 17, 12, 5, 5, 12, 78, 119, 90, 27, 0, 4, 2, 48, 92, 112, 85, 15, 0, 2, 7, 50, 36, 15, 11, 1, 0, 0, 7]") ASC LIMIT 1; select * from t3 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1; @@ -95,7 +90,5 @@ drop table t3; -- end t3 --- @bvt:issue - drop database hnsw_cdc; diff --git a/test/distributed/cases/sequence/seq_func2.result b/test/distributed/cases/sequence/seq_func2.result index 809ba132b3c34..def8b1d03ae14 100644 --- a/test/distributed/cases/sequence/seq_func2.result +++ b/test/distributed/cases/sequence/seq_func2.result @@ -117,35 +117,24 @@ currval(seq1) nextval(seq1) lastval() currval(seq1) lastval() 50 51 51 51 51 drop sequence seq1; create table seq_table_01(col1 int); - create sequence seq_14 increment 50 start with 126 no cycle; - select nextval('seq_14'); nextval(seq_14) 126 - select nextval('seq_14'),currval('seq_14'); nextval(seq_14) currval(seq_14) 176 176 - insert into seq_table_01 select nextval('seq_14'); - select currval('seq_14'); currval(seq_14) 226 - insert into seq_table_01 values(nextval('seq_14')); - insert into seq_table_01 values(nextval('seq_14')); - insert into seq_table_01 values(nextval('seq_14')); - insert into seq_table_01 values(nextval('seq_14')); - select currval('seq_14'); currval(seq_14) 426 - select * from seq_table_01; col1 226 @@ -153,7 +142,5 @@ col1 326 376 426 - drop sequence seq_14; - drop table seq_table_01; diff --git a/test/distributed/cases/sequence/seq_func2.sql b/test/distributed/cases/sequence/seq_func2.sql index 362e6e27f973d..b29ca1544a707 100644 --- a/test/distributed/cases/sequence/seq_func2.sql +++ b/test/distributed/cases/sequence/seq_func2.sql @@ -92,7 +92,6 @@ select setval('seq1', 50); select currval('seq1'),nextval('seq1'),lastval(),currval('seq1'),lastval(); drop sequence seq1; --- @bvt:issue#9847 create table seq_table_01(col1 int); create sequence seq_14 increment 50 start with 126 no cycle; --126[176] @@ -117,4 +116,3 @@ select * from seq_table_01; drop sequence seq_14; drop table seq_table_01; --- @bvt:issue \ No newline at end of file diff --git a/test/distributed/cases/stage/external_stage.result b/test/distributed/cases/stage/external_stage.result index 12e09c270fff3..33c33fc2ca707 100644 --- a/test/distributed/cases/stage/external_stage.result +++ b/test/distributed/cases/stage/external_stage.result @@ -222,35 +222,35 @@ t5 CREATE TABLE `t5` (\n `col1` int NOT NULL AUTO_INCREMENT,\n `col2` int D drop table t5; drop stage stage05; drop table if exists t6; - create table t6 (col1 varchar(20), col2 varchar(20)); - load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; - select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"Hello"" ¦ "Hi" 𝄀 +"database" ¦ ""db" drop stage if exists stage06; - create stage stage06 url = 'file:///$resources/into_outfile/stage'; - select * from mo_catalog.mo_stages; - +➤ stage_id[4,32,0] ¦ stage_name[12,-1,0] ¦ url[12,0,0] ¦ stage_credentials[12,0,0] ¦ stage_status[12,-1,0] ¦ created_time[93,64,0] ¦ comment[12,0,0] 𝄀 +10055 ¦ stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile/stage ¦ ¦ in_use ¦ 2026-03-09 04:58:42 ¦ show stages; - -select * from t6 into outfile 'stage://stage06/local_stage_table06.csv'; - +➤ STAGE_NAME[12,-1,0] ¦ URL[12,0,0] ¦ STATUS[12,-1,0] ¦ COMMENT[12,0,0] 𝄀 +stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile/stage ¦ in_use ¦ +select * from t6 into outfile 'stage://stage06/local_stage_table06.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; truncate t6; - -load data infile 'stage://stage06/local_stage_table06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; - +load data infile 'stage://stage06/local_stage_table06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"Hello"" ¦ "Hi" 𝄀 +"database" ¦ ""db" show create table t6; - +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +t6 ¦ CREATE TABLE `t6` ( + `col1` varchar(20) DEFAULT NULL, + `col2` varchar(20) DEFAULT NULL +) drop table t6; - drop stage stage06; - drop table if exists t7; create table t7(col1 text, col2 text); load data infile {'filepath'='$resources/load_data/text.csv.tar.gz', 'compression'='tar.gz'} into table t7 FIELDS ENCLOSED BY '"' TERMINATED BY "," LINES TERMINATED BY '\n' parallel 'true'; diff --git a/test/distributed/cases/stage/external_stage.sql b/test/distributed/cases/stage/external_stage.sql index 3341b869a702c..029ea6c57cbc0 100644 --- a/test/distributed/cases/stage/external_stage.sql +++ b/test/distributed/cases/stage/external_stage.sql @@ -149,7 +149,6 @@ drop stage stage05; -- load data with fields terminated by ',' enclosed by '`' lines terminated by '\n' from stage and upload to table --- @bvt:issue#18712 drop table if exists t6; create table t6 (col1 varchar(20), col2 varchar(20)); load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; @@ -160,14 +159,13 @@ create stage stage06 url = 'file:///$resources/into_outfile/stage'; select * from mo_catalog.mo_stages; -- @ignore:1 show stages; -select * from t6 into outfile 'stage://stage06/local_stage_table06.csv'; +select * from t6 into outfile 'stage://stage06/local_stage_table06.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; truncate t6; -load data infile 'stage://stage06/local_stage_table06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; +load data infile 'stage://stage06/local_stage_table06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; select * from t6; show create table t6; drop table t6; drop stage stage06; --- @bvt:issue diff --git a/test/distributed/cases/stage/external_stage_columns.result b/test/distributed/cases/stage/external_stage_columns.result index 62bd99b7d09e0..2c913f1ce8fdb 100644 --- a/test/distributed/cases/stage/external_stage_columns.result +++ b/test/distributed/cases/stage/external_stage_columns.result @@ -240,37 +240,34 @@ t5 CREATE TABLE `t5` (\n `col1` int NOT NULL AUTO_INCREMENT,\n `col2` int D drop table t5; drop stage stage05; drop table if exists t6; - create table t6 (col1 varchar(20), col2 varchar(20)); - load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; - select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"Hello"" ¦ "Hi" 𝄀 +"database" ¦ ""db" drop stage if exists stage06; - create stage stage06 url = 'file:///$resources/into_outfile/stage'; - select * from mo_catalog.mo_stages; - +➤ stage_id[4,32,0] ¦ stage_name[12,-1,0] ¦ url[12,0,0] ¦ stage_credentials[12,0,0] ¦ stage_status[12,-1,0] ¦ created_time[93,64,0] ¦ comment[12,0,0] 𝄀 +10087 ¦ stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile/stage ¦ ¦ in_use ¦ 2026-03-09 05:06:36 ¦ show stages; - -select col2 from t6 into outfile 'stage://stage06/local_stage_table006.csv'; - +➤ STAGE_NAME[12,-1,0] ¦ URL[12,0,0] ¦ STATUS[12,-1,0] ¦ COMMENT[12,0,0] 𝄀 +stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile/stage ¦ in_use ¦ +select col2 from t6 into outfile 'stage://stage06/local_stage_table006.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; drop table if exists t6; - create table t6 (col2 varchar(20)); - load data infile 'stage://stage06/local_stage_table006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; - select * from t6; - +➤ col2[12,-1,0] 𝄀 +""db" show create table t6; - +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +t6 ¦ CREATE TABLE `t6` ( + `col2` varchar(20) DEFAULT NULL +) drop table t6; - drop stage stage06; - drop table if exists t7; create table t7(col1 text, col2 text); load data infile {'filepath'='$resources/load_data/text.csv.tar.gz', 'compression'='tar.gz'} into table t7 FIELDS ENCLOSED BY '"' TERMINATED BY "," LINES TERMINATED BY '\n' parallel 'true'; diff --git a/test/distributed/cases/stage/external_stage_columns.sql b/test/distributed/cases/stage/external_stage_columns.sql index c3edeba0092c5..9e15618d472dc 100644 --- a/test/distributed/cases/stage/external_stage_columns.sql +++ b/test/distributed/cases/stage/external_stage_columns.sql @@ -167,7 +167,6 @@ drop stage stage05; -- load data with fields terminated by ',' enclosed by '`' lines terminated by '\n' from stage and upload to table --- @bvt:issue#18712 drop table if exists t6; create table t6 (col1 varchar(20), col2 varchar(20)); load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; @@ -178,7 +177,7 @@ create stage stage06 url = 'file:///$resources/into_outfile/stage'; select * from mo_catalog.mo_stages; -- @ignore:1 show stages; -select col2 from t6 into outfile 'stage://stage06/local_stage_table006.csv'; +select col2 from t6 into outfile 'stage://stage06/local_stage_table006.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; drop table if exists t6; create table t6 (col2 varchar(20)); load data infile 'stage://stage06/local_stage_table006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; @@ -186,7 +185,6 @@ select * from t6; show create table t6; drop table t6; drop stage stage06; --- @bvt:issue diff --git a/test/distributed/cases/stage/stage_based_stage.result b/test/distributed/cases/stage/stage_based_stage.result index 7daeabbb5158d..60269cfbd2f42 100644 --- a/test/distributed/cases/stage/stage_based_stage.result +++ b/test/distributed/cases/stage/stage_based_stage.result @@ -247,41 +247,39 @@ drop table t5; drop stage stage05; drop stage substage05; drop table if exists t6; - create table t6 (col1 varchar(20), col2 varchar(20)); - load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; - select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"Hello"" ¦ "Hi" 𝄀 +"database" ¦ ""db" drop stage if exists stage06; - create stage stage06 url = 'file:///$resources/into_outfile'; - drop stage if exists substage06; - create stage substage06 url = 'stage://stage06/stage'; - select * from mo_catalog.mo_stages; - +➤ stage_id[4,32,0] ¦ stage_name[12,-1,0] ¦ url[12,0,0] ¦ stage_credentials[12,0,0] ¦ stage_status[12,-1,0] ¦ created_time[93,64,0] ¦ comment[12,0,0] 𝄀 +10138 ¦ stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile ¦ ¦ in_use ¦ 2026-03-09 05:13:22 ¦ 𝄀 +10139 ¦ substage06 ¦ stage://stage06/stage ¦ ¦ in_use ¦ 2026-03-09 05:13:22 ¦ show stages; - -select * from t6 into outfile 'stage://substage06/local_stage_t06.csv'; - +➤ STAGE_NAME[12,-1,0] ¦ URL[12,0,0] ¦ STATUS[12,-1,0] ¦ COMMENT[12,0,0] 𝄀 +stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile ¦ in_use ¦ 𝄀 +substage06 ¦ stage://stage06/stage ¦ in_use ¦ +select * from t6 into outfile 'stage://substage06/local_stage_t06.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; truncate t6; - load data infile 'stage://substage06/local_stage_t06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; - select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"database" ¦ ""db" show create table t6; - +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +t6 ¦ CREATE TABLE `t6` ( + `col1` varchar(20) DEFAULT NULL, + `col2` varchar(20) DEFAULT NULL +) drop table t6; - drop stage stage06; - drop stage substage06; - drop table if exists t7; create table t7(col1 text, col2 text); load data infile {'filepath'='$resources/load_data/text.csv.tar.gz', 'compression'='tar.gz'} into table t7 FIELDS ENCLOSED BY '"' TERMINATED BY "," LINES TERMINATED BY '\n' parallel 'true'; diff --git a/test/distributed/cases/stage/stage_based_stage.sql b/test/distributed/cases/stage/stage_based_stage.sql index 46e5c15e017c2..ffc0d16416156 100644 --- a/test/distributed/cases/stage/stage_based_stage.sql +++ b/test/distributed/cases/stage/stage_based_stage.sql @@ -164,7 +164,6 @@ drop stage substage05; -- load data with fields terminated by ',' enclosed by '`' lines terminated by '\n' from stage and upload to table --- @bvt:issue#18712 drop table if exists t6; create table t6 (col1 varchar(20), col2 varchar(20)); load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; @@ -177,7 +176,7 @@ create stage substage06 url = 'stage://stage06/stage'; select * from mo_catalog.mo_stages; -- @ignore:1 show stages; -select * from t6 into outfile 'stage://substage06/local_stage_t06.csv'; +select * from t6 into outfile 'stage://substage06/local_stage_t06.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; truncate t6; load data infile 'stage://substage06/local_stage_t06.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; select * from t6; @@ -185,7 +184,6 @@ show create table t6; drop table t6; drop stage stage06; drop stage substage06; --- @bvt:issue diff --git a/test/distributed/cases/stage/stage_based_stage_columns.result b/test/distributed/cases/stage/stage_based_stage_columns.result index f979d2f8a6d03..95ac6cfb51018 100644 --- a/test/distributed/cases/stage/stage_based_stage_columns.result +++ b/test/distributed/cases/stage/stage_based_stage_columns.result @@ -264,43 +264,40 @@ drop table t5; drop stage stage05; drop stage substage05; drop table if exists t6; - create table t6 (col1 varchar(20), col2 varchar(20)); - load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; - select * from t6; - +➤ col1[12,-1,0] ¦ col2[12,-1,0] 𝄀 +"Hello"" ¦ "Hi" 𝄀 +"database" ¦ ""db" drop stage if exists stage06; - create stage stage06 url = 'file:///$resources/into_outfile'; - drop stage if exists substage06; - create stage substage06 url = 'stage://stage06/stage'; - select * from mo_catalog.mo_stages; - +➤ stage_id[4,32,0] ¦ stage_name[12,-1,0] ¦ url[12,0,0] ¦ stage_credentials[12,0,0] ¦ stage_status[12,-1,0] ¦ created_time[93,64,0] ¦ comment[12,0,0] 𝄀 +10198 ¦ stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile ¦ ¦ in_use ¦ 2026-03-09 05:17:49 ¦ 𝄀 +10199 ¦ substage06 ¦ stage://stage06/stage ¦ ¦ in_use ¦ 2026-03-09 05:17:49 ¦ show stages; - -select col2 from t6 into outfile 'stage://substage06/local_stage_t006.csv'; - +➤ STAGE_NAME[12,-1,0] ¦ URL[12,0,0] ¦ STATUS[12,-1,0] ¦ COMMENT[12,0,0] 𝄀 +stage06 ¦ file:////Users/ariznawl/code/matrixone/test/distributed/resources/into_outfile ¦ in_use ¦ 𝄀 +substage06 ¦ stage://stage06/stage ¦ in_use ¦ +select col2 from t6 into outfile 'stage://substage06/local_stage_t006.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; drop table t6; - create table t6 (col2 varchar(20)); - -load data infile 'stage://substage06/local_stage_t006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; - +load data infile 'stage://substage06/local_stage_t006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; select * from t6; - +➤ col2[12,-1,0] 𝄀 +"Hi" 𝄀 +""db" show create table t6; - +➤ Table[12,-1,0] ¦ Create Table[12,-1,0] 𝄀 +t6 ¦ CREATE TABLE `t6` ( + `col2` varchar(20) DEFAULT NULL +) drop table t6; - drop stage stage06; - drop stage substage06; - drop table if exists t7; create table t7(col1 text, col2 text); load data infile {'filepath'='$resources/load_data/text.csv.tar.gz', 'compression'='tar.gz'} into table t7 FIELDS ENCLOSED BY '"' TERMINATED BY "," LINES TERMINATED BY '\n' parallel 'true'; diff --git a/test/distributed/cases/stage/stage_based_stage_columns.sql b/test/distributed/cases/stage/stage_based_stage_columns.sql index 36dcb4155e834..7eb042dca4a7a 100644 --- a/test/distributed/cases/stage/stage_based_stage_columns.sql +++ b/test/distributed/cases/stage/stage_based_stage_columns.sql @@ -181,7 +181,6 @@ drop stage substage05; -- load data with fields terminated by ',' enclosed by '`' lines terminated by '\n' from stage and upload to table --- @bvt:issue#18712 drop table if exists t6; create table t6 (col1 varchar(20), col2 varchar(20)); load data infile '$resources/load_data/test_enclosed_by01.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; @@ -194,16 +193,15 @@ create stage substage06 url = 'stage://stage06/stage'; select * from mo_catalog.mo_stages; -- @ignore:1 show stages; -select col2 from t6 into outfile 'stage://substage06/local_stage_t006.csv'; +select col2 from t6 into outfile 'stage://substage06/local_stage_t006.csv' fields terminated by ',' enclosed by '' lines terminated by '\n' header 'false'; drop table t6; create table t6 (col2 varchar(20)); -load data infile 'stage://substage06/local_stage_t006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n' ignore 1 lines; +load data infile 'stage://substage06/local_stage_t006.csv' into table t6 fields terminated by ',' enclosed by '`' lines terminated by '\n'; select * from t6; show create table t6; drop table t6; drop stage stage06; drop stage substage06; --- @bvt:issue diff --git a/test/distributed/resources/parquet/Titanic.parquet b/test/distributed/resources/parquet/Titanic.parquet new file mode 100644 index 0000000000000..a9847c5df4c8f Binary files /dev/null and b/test/distributed/resources/parquet/Titanic.parquet differ