dcapwell commented on PR #2310:
URL: https://github.com/apache/cassandra/pull/2310#issuecomment-1572573531

   > 
   
   Looked at a debugger and it is something we can make better, just need to 
update `org.apache.cassandra.cql3.functions.FunctionParameter#inferType` for 
our arg type (we currently use `FunctionParameter.anyType(true)`)
   
   We get `null` when doing `arg.getCompatibleTypeIfKnown(keyspace)` as we have 
no clue what it could be... but we do have access to the other args + receiver 
type...  so for vectors we could just assume that any of the 2 other variables 
we have access to are defined... if non are defined we fail with this type 
cast...
   
   I am not including this `VectorFct` class in this PR as I don't define any 
functions... but it doesn't seem bad to get `assertRows(execute("SELECT 
similarity_cosine(value, ?) FROM %s WHERe pk=0", vector(1f, 2f)), 
row(vector(1f, 2f)));` working


-- 
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]

Reply via email to