Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
N/A
-
None
Description
When two vectors of different lengths are passed as arguments to distance functions, the functions return NULL without an error or a warning
bb-11.6-MDEV-32887-vector 27ae9cbb91489e93fe30b02360a843f974e5e1fc |
MariaDB [test]> select vec_distance_euclidean(0x00000000000000000,0x00000000); |
+--------------------------------------------------------+ |
| vec_distance_euclidean(0x00000000000000000,0x00000000) |
|
+--------------------------------------------------------+ |
| NULL | |
+--------------------------------------------------------+ |
1 row in set (0.001 sec) |
If it's intentional, I think it needs to find a notable place in the documentation: it is a mistake easy to make (not with the constant values as above of course, but with columns, variables, parameters etc), and given that the main purpose of the functions is to be used in ORDER BY – that is, not to return the result set explicitly, easy to miss, as the queries will still work, they'll be just returning random-ish results instead of best matches.
Attachments
Issue Links
- is caused by
-
MDEV-34939 vector search in 11.7
- Closed