mike-tr-adamson commented on code in PR #2310:
URL: https://github.com/apache/cassandra/pull/2310#discussion_r1192268344
##########
src/java/org/apache/cassandra/cql3/Lists.java:
##########
@@ -154,6 +155,8 @@ public Literal(List<Term.Raw> elements)
public Term prepare(String keyspace, ColumnSpecification receiver)
throws InvalidRequestException
{
+ if (receiver.type instanceof VectorType)
Review Comment:
I agree with this completely. The problem we have is that we are now using
`[1.0, 2.0, 3.0]` for lists and vectors which each have very different
expectations. The lists are expecting this to be a `List<>` type and vectors
are expecting this to be a primitive array `float[]`. This is not easily
handled by trying to do all the work in a single class.
My feeling is that we need a separate `Arrays` class that delegates to
`Lists` and `Vectors`. I have had a play with this and it, mostly, works fine.
One advantage is that we only need to implement a `public static class Literal
extends Term.Raw`. This class would defer to `Lists` and `Vectors` to handle
the actual work.
--
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]