mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 08:30:35 +00:00
The similarity function syntax is: `similarity_<metric_name>(<vector>, <vector>)` Where `<metric_name>` is one of `cosine`, `euclidean` and `dot_product` matching the intended similarity metric to be used within calculations. Where `<vector>` is either a vector column name or vector literal. Add `vectorSimilarityArgs` symbol that is an extension of `selectionFunctionArgs`, but allowing to use the `value` as an argument as well as the `unaliasedSelector`. This is needed as the similarity function syntax allows both the arguments to be a vector value, so the grammar needs to recognize the vector literal there as well. Since we actually support `SELECT`s with constants since this patch, return true instead of throwing an error while trying to convert the function call to constant.