-DATASET CSV empty

--

-CASE Error
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CREATE NODE TABLE test(id int64 primary key, vec int64[90]);
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('test2', 'e_hnsw_index', 'vec');
---- error
Binder exception: Table test2 does not exist.
-STATEMENT CALL CREATE_VECTOR_INDEX('test', 'e_hnsw_index', 'vec2');
---- error
Binder exception: Column vec2 does not exist in table test.
-STATEMENT CALL CREATE_VECTOR_INDEX('test', 'e_hnsw_index', 'vec');
---- error
Binder exception: VECTOR_INDEX only supports FLOAT/DOUBLE ARRAY columns.
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[960], PRIMARY KEY (id));
---- ok
-STATEMENT COPY embeddings FROM "${KUZU_ROOT_DIRECTORY}/dataset/embeddings/embeddings-960-1k.csv" (deLim=',');
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec');
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index_ml_too_large', 'vec', ml := 3000);
---- error(regex)
Binder exception: Unsupported configured ml value 3000, the maximum supported value is \d+.
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', CAST([0.0459,0.0439,0.0251], 'FLOAT[3]'), 10) RETURN *;
---- error
Binder exception: Cannot change literal expression data type from FLOAT[3] to FLOAT[960].
-STATEMENT CALL DROP_VECTOR_INDEX('embeddings', 'e_hnsw_index2');
---- error
Binder exception: Table embeddings doesn't have an index with name e_hnsw_index2.
-STATEMENT CALL DROP_VECTOR_INDEX('embeddingssss', 'e_hnsw_indexxxx');
---- error
Binder exception: Table embeddingssss does not exist.

-CASE ParamError
-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', unknown_param := 1);
---- error
Binder exception: Unrecognized optional parameter unknown_param in CREATE_VECTOR_INDEX.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', efc := 0);
---- error
Binder exception: Efc must be a positive integer.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', mu := 0);
---- error
Binder exception: Mu must be a positive integer between 1 and 26213.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', mu := 100000);
---- error
Binder exception: Mu must be a positive integer between 1 and 26213.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', ml := -1);
---- error
Binder exception: Ml must be a positive integer between 1 and 26213.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', ml := 100000);
---- error
Binder exception: Ml must be a positive integer between 1 and 26213.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', pu := 1.5);
---- error
Binder exception: Pu must be a double between 0 and 1.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', alpha := 0.5);
---- error
Binder exception: Alpha must be a double greater than or equal to 1.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', metric := 'invalid');
---- error
Binder exception: Metric must be one of COSINE, L2, L2SQ or DOTPRODUCT.
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec');
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', CAST([0.0459,0.0439,0.0251,0.1,0.2,0.3,0.4,0.4], 'FLOAT[8]'), 10, unknown_param := 1) RETURN *;
---- error
Binder exception: Unrecognized optional parameter unknown_param in QUERY_VECTOR_INDEX.
-STATEMENT CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', CAST([0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557],'FLOAT[8]'), 3, efs := -1) RETURN node.id, distance ORDER BY distance;
---- error
Binder exception: Efs must be a positive integer.

-CASE CastingError
-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 CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', ['abc','def','ddd','awe','alice','bob','de','pwd'], 3) RETURN node.id ORDER BY distance;
---- error
Binder exception: Expression LIST_CREATION(abc,def,ddd,awe,alice,bob,de,pwd) has data type STRING[] but expected FLOAT[8]. Implicit cast is not supported.
-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], 'abc') RETURN node.id ORDER BY distance;
---- error
Binder exception: Function QUERY_VECTOR_INDEX did not receive correct arguments:
Actual:   (STRING,STRING,DOUBLE[],STRING)
Expected: (STRING,STRING,ARRAY,INT64)

-CASE ProjectedGraphError
-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');
---- ok
-STATEMENT CREATE NODE TABLE test(id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CREATE REL TABLE rel(FROM embeddings TO embeddings);
---- ok
-STATEMENT CALL QUERY_VECTOR_INDEX('emb-graph3', 'e_hnsw_index', CAST([0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557],'FLOAT[8]'), 3) RETURN node.id ORDER BY distance;
---- error
Binder exception: Cannot find table or graph named as emb-graph3.

-CASE InCorrectSearchThreshold
-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 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, blind_search_up_sel := 1.1) RETURN node.id ORDER BY distance;
---- error
Binder exception: Blind search upper selectivity threshold must be a double between 0 and 1.
-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, directed_search_up_sel := -0.1) RETURN node.id ORDER BY distance;
---- error
Binder exception: Directed search upper selectivity threshold must be a double between 0 and 1.
-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, directed_search_up_sel := 0.1, blind_search_up_sel := 0.8) RETURN node.id ORDER BY distance;
---- error
Binder exception: Blind search upper selectivity threshold is set to 0.800000, but the directed search upper selectivity threshold is set to 0.100000. The blind search upper selectivity threshold must be less than the directed search upper selectivity threshold.

-CASE DropTableWithIndex
-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 SHOW_INDEXES() RETURN *
---- 1
embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', mu := 30, ml := 60, pu := 0.050000, metric := 'l2', alpha := 1.100000, efc := 200);
-STATEMENT DROP TABLE embeddings;
---- error
Binder exception: Cannot delete node table embeddings because it is referenced by index e_hnsw_index.
-STATEMENT CALL DROP_VECTOR_INDEX('embeddings', 'e_hnsw_index');
---- ok
-STATEMENT DROP TABLE embeddings;
---- ok

-CASE DropColumnWithIndex
-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 SHOW_INDEXES() RETURN *
---- 1
embeddings|e_hnsw_index|HNSW|[vec]|True|CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec', mu := 30, ml := 60, pu := 0.050000, metric := 'l2', alpha := 1.100000, efc := 200);
-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 NgativeK
-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 CALL QUERY_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], -1) RETURN node.id ORDER BY distance;
---- error
Binder exception: The value of k must be greater than 0.

-CASE RunFunctionWithoutExtension
-SKIP_IN_MEM
-SKIP_STATIC_LINK
-STATEMENT CREATE NODE TABLE embeddings (id int64, vec FLOAT[8], PRIMARY KEY (id));
---- ok
-STATEMENT CREATE (:embeddings {id:1, vec:[0,1,2,3,4,5,6,7]});
---- ok
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index','vec', metric := 'l2');
---- error
Catalog exception: function CREATE_VECTOR_INDEX is not defined. This function exists in the VECTOR extension. You can install and load the extension by running 'INSTALL VECTOR; LOAD EXTENSION VECTOR;'.
-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], -1) RETURN node.id ORDER BY distance;
---- error
Catalog exception: function QUERY_VECTOR_INDEX is not defined. This function exists in the VECTOR extension. You can install and load the extension by running 'INSTALL VECTOR; LOAD EXTENSION VECTOR;'.
-STATEMENT CALL DROP_VECTOR_INDEX('embeddings', 'e_hnsw_index', [0.1521,0.3021,0.5366,0.2774,0.5593,0.5589,0.1365,0.8557], -1) RETURN node.id ORDER BY distance;
---- error
Catalog exception: function DROP_VECTOR_INDEX is not defined. This function exists in the VECTOR extension. You can install and load the extension by running 'INSTALL VECTOR; LOAD EXTENSION VECTOR;'.
-LOAD_DYNAMIC_EXTENSION vector
-STATEMENT CALL CREATE_VECTOR_INDEX('embeddings', 'e_hnsw_index', 'vec');
---- ok
-RELOADDB
-STATEMENT MATCH (a:embeddings) SET a.vec = [0,1,2,3,4,5,6,7];
---- error
Binder exception: Cannot set property vec in table embeddings because it is used in one or more indexes which is unloaded.
-STATEMENT CREATE (:embeddings {id:0, vec:[0,1,2,3,4,5,6,7]});
---- error
Binder exception: Trying to insert into an index on table embeddings but its extension is not loaded.
-STATEMENT MERGE (:embeddings {id:0, vec:[0,1,2,3,4,5,6,7]});
---- error
Binder exception: Trying to insert into an index on table embeddings but its extension is not loaded.
-STATEMENT COPY embeddings FROM (RETURN 3, [1,2,3,4,5,6,7,8]);
---- error
Binder exception: Trying to insert into an index on table embeddings but its extension is not loaded.
-STATEMENT MATCH (a:embeddings) DELETE a;
---- error
Binder exception: Trying to delete from an index on table embeddings but its extension is not loaded.
-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.
