mike-tr-adamson commented on code in PR #2310:
URL: https://github.com/apache/cassandra/pull/2310#discussion_r1205348739


##########
src/java/org/apache/cassandra/cql3/CQL3Type.java:
##########
@@ -59,9 +58,24 @@ default boolean isUDT()
      * Generates CQL literal from a binary value of this type.
      *  @param bytes the value to convert to a CQL literal. This value must be
      * serialized with {@code version} of the native protocol.
-     * @param version the native protocol version in which {@code buffer} is 
encoded.
      */
-    String toCQLLiteral(ByteBuffer bytes, ProtocolVersion version);
+    String toCQLLiteral(ByteBuffer bytes);
+
+    /**
+     * Generates a binary value for the CQL literal of this type
+     */
+    default ByteBuffer fromCQLLiteral(String literal)
+    {
+        return fromCQLLiteral("--dummy--", literal);

Review Comment:
   I think my main concern is that this may not be valid for for all types. As 
it happens this method is only used in `AbstractTypeTest`. I think it would 
make sense to remove this method from here to the test so it isn't accidentally 
used in live code without clear understanding of the effects.



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