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


##########
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:
   On no, if `toString` throws an exception, it will cause too much 
inconvenience, e.g. the data provider annotation will even break.  I changed it 
to 
   ```
       return this.list.stream()
           .map(ele -> ele.toString())
           .collect(Collectors.joining(", ", "[", "]"));
   ```
   The only problem is that strings and date times are not properly quoted. 
Everything else works fine.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to