maedhroz commented on code in PR #3987: URL: https://github.com/apache/cassandra/pull/3987#discussion_r2000148881
########## src/java/org/apache/cassandra/utils/ByteBufferUtil.java: ########## @@ -544,6 +548,17 @@ else if (obj instanceof byte[]) return ByteBuffer.wrap((byte[]) obj); else if (obj instanceof ByteBuffer) return (ByteBuffer) obj; + else if (obj instanceof Set) + { + Set<?> set = (Set<?>) obj; + // convert subtypes to BB + Set<ByteBuffer> bbs = new LinkedHashSet<>(); + for (Object o : set) + if (!bbs.add(objectToBytes(o))) + throw new IllegalStateException("Object " + o + " maps to a buffer that already exists in the set"); + // decompose/serializer doesn't use the isMultiCell, so safe to do this + return SetType.getInstance(BytesType.instance, false).decompose(bbs); + } Review Comment: This is part of a larger set of capabilities already in trunk. -- 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