dcapwell commented on PR #2310:
URL: https://github.com/apache/cassandra/pull/2310#issuecomment-1572560326
> ... this fails the same way mine did when you try to compare to a bind
variable
>
> ```
> @Test
> public void selectFloatVectorFunctions()
> {
> createTable(KEYSPACE, "CREATE TABLE %s (pk int primary key, value
vector<float, 2>)");
>
> execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1f,
2f));
> execute("SELECT similarity_cosine(value, ?) FROM %s WHERe pk=0",
vector(1f, 2f));
> }
> ```
>
> ```
> org.apache.cassandra.exceptions.InvalidRequestException: Cannot infer type
of argument ? in call to function system.similarity_cosine(any, any): use type
casts to disambiguate
> ```
>
> commit on top of your branch at
https://github.com/jbellis/cassandra/tree/dc-vector
I think that's also the behavior for all functions that have multiple type
signatures... we don't know which one due to bind type not being known... so
the error I think is correct, you need `(vector<float, 2>) ?`. A float vector
of size 2 is different than the float vector of size 4 from a type point of
view, so we need that information in order to resolve functions...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]