-DATASET CSV empty
-BUFFER_POOL_SIZE 134217728

--

-CASE InsertToNonEmpty
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL threads=1;
---- ok
-STATEMENT COPY embeddings FROM "${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv" (deLim=',');
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
333
444
133
-STATEMENT CREATE (t:embeddings {id: 1000, vec: [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557]});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
1000
333
444
-STATEMENT CHECKPOINT;
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
1000
333
444
-STATEMENT MATCH (t:embeddings) WHERE t.id = 1000 SET t.id = 1;
---- error
Binder exception: Cannot set property id in table embeddings because it is used as primary key. Try delete and then insert.
-STATEMENT MATCH (t:embeddings) WHERE t.id = 1000 SET t.vec = [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.0];
---- error
Runtime exception: Cannot set property vec in table embeddings because it is used in one or more indexes. Try delete and then insert.
-STATEMENT ALTER TABLE embeddings DROP vec;
---- error
Binder exception: Cannot drop property vec in table embeddings because it is used in one or more indexes. Please remove the associated indexes before attempting to drop this property.

-CASE BulkInsertToEmpty
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT CALL threads=1;
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 limit 100 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
37
40
52
-STATEMENT CREATE (t:embeddings {id: 1000, vec: [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557]});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
1000
37
40
-STATEMENT CHECKPOINT;
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
1000
37
40

-CASE BulkInsertToNonEmpty
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT CALL threads=1;
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 limit 100 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
37
40
52
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 100 limit 100 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
133
186
146
-STATEMENT CHECKPOINT;
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
133
186
146

-CASE SerialInsertionsToNonEmpty
-STATEMENT CALL threads=1;
---- ok
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 limit 990 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 990 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 991 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 992 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 993 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 994 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 995 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 996 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 997 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 998 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 999 limit 1 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
333
444
133
-STATEMENT CHECKPOINT;
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
333
444
133

-CASE CopyToEmpty
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
---- 0
-STATEMENT COPY embeddings FROM "${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv" (deLim=',');
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
333
444
133

-CASE MultipleInsertions
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT CALL threads=1;
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 limit 500 CREATE (:embeddings {id: c0, vec: c1});
---- ok
-STATEMENT checkpoint;
---- ok
-STATEMENT load from '${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv' with column0 as c0, column1 as c1 skip 500 limit 500 CREATE (:embeddings {id: c0, vec: c1});
 ---- ok
-STATEMENT checkpoint;
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], 3, efs := 500) RETURN node.id ORDER BY distance;
-CHECK_ORDER
---- 3
333
444
133

-CASE CopyAfterDeleteAll
-SKIP_IN_MEM
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT COPY embeddings FROM "${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv" (deLim=',');
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- ok
-STATEMENT MATCH (n:embeddings) DELETE n;
---- ok
-RELOADDB
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT COPY embeddings FROM "${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-8-1k.csv" (deLim=',');
---- ok
