You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a table with a float_vector field and attempting to insert a string representation of an array into this field, an error occurs when executing a KNN query. Instead of a more clear error indicating that the data format is incorrect (string instead of a numeric array), the system returns an “Undefined array key 0” message.
Expected result:
The system should properly handle cases where data for a float_vector field is inserted in the wrong format and return an informative error indicating the need to use a numeric array instead of a string.
ERROR 1064 (42000): Invalid data format for 'float_vector' field. Expected a numeric array, but received a string.
MRE
-------------
CREATE TABLE knn_test (id BIGINT, model TEXT, vector float_vector)
--------------
--------------
INSERT INTO knn_test (id, model, vector) VALUES (1, 'Model_1', '[0.9012, 0.2126, 0.2879, 0.7552]')
--------------
--------------
SELECT count(*) FROM knn_test WHERE knn(vector, 10, 1)
--------------
ERROR 1064 (42000) at line 1: Undefined array key 0
The text was updated successfully, but these errors were encountered:
Description:
When creating a table with a float_vector field and attempting to insert a string representation of an array into this field, an error occurs when executing a KNN query. Instead of a more clear error indicating that the data format is incorrect (string instead of a numeric array), the system returns an “Undefined array key 0” message.
Expected result:
The system should properly handle cases where data for a float_vector field is inserted in the wrong format and return an informative error indicating the need to use a numeric array instead of a string.
MRE
The text was updated successfully, but these errors were encountered: