absurdfarce commented on code in PR #1952:
URL:
https://github.com/apache/cassandra-java-driver/pull/1952#discussion_r1917500841
##########
core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/VectorCodec.java:
##########
@@ -156,4 +116,195 @@ public CqlVector<SubtypeT> parse(@Nullable String value) {
? null
: CqlVector.from(value, this.subtypeCodec);
}
+
+ private static class FixedLength<SubtypeT> implements
VectorCodecProxy<SubtypeT> {
+ private final VectorType cqlType;
+ private final TypeCodec<SubtypeT> subtypeCodec;
+
+ private FixedLength(VectorType cqlType, TypeCodec<SubtypeT> subtypeCodec) {
+ this.cqlType = cqlType;
+ this.subtypeCodec = subtypeCodec;
+ }
+
+ @Override
+ public ByteBuffer encode(
+ @Nullable CqlVector<SubtypeT> value, @NonNull ProtocolVersion
protocolVersion) {
+ if (value == null || cqlType.getDimensions() <= 0) {
+ return null;
+ }
+ ByteBuffer[] valueBuffs = new ByteBuffer[cqlType.getDimensions()];
Review Comment:
Since this ticket is one of the few remaining for 4.19.0 I don't want to
take any chance on delaying this for extraneous work. I'm happy to consider
CASSJAVA-60 for a future release, perhaps even in 4.19.1... it would be nice if
4.19.1 were just a smaller release so we can get out of the habit of
overloading each release. But I don't really want to worry about it now.
--
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]