SiyaoIsHiding commented on code in PR #1952:
URL: 
https://github.com/apache/cassandra-java-driver/pull/1952#discussion_r1742757796


##########
core/src/main/java/com/datastax/oss/driver/api/core/data/CqlVector.java:
##########
@@ -196,7 +233,8 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    return Iterables.toString(this.list);
+    TypeCodec<T> subcodec = CodecRegistry.DEFAULT.codecFor(list.get(0));

Review Comment:
   Previously we promised that `CqlVector.from` should mirror 
`CqlVector.toString`. `CqlVector.from` has access to a subtype codec and 
expects some values to be single-quoted, e.g. texts. Therefore, without this 
change to `toString`, a round-trip test like 
`CqlVector.from(vector1.toString(), codec);` will fail. However, fetching the 
default codec for the subtype looks like too much effort for something simple 
like `toString`.



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