blerer commented on code in PR #2655:
URL: https://github.com/apache/cassandra/pull/2655#discussion_r1376242695


##########
src/java/org/apache/cassandra/cql3/Maps.java:
##########
@@ -249,138 +235,6 @@ public String getText()
         }
     }
 
-    public static class Value extends Term.Terminal
-    {
-        public final SortedMap<ByteBuffer, ByteBuffer> map;
-
-        public Value(SortedMap<ByteBuffer, ByteBuffer> map)
-        {
-            this.map = map;
-        }
-
-        public static <K, V> Value fromSerialized(ByteBuffer value, MapType<K, 
V> type) throws InvalidRequestException
-        {
-            try
-            {
-                // Collections have this small hack that validate cannot be 
called on a serialized object,
-                // but compose does the validation (so we're fine).
-                Map<K, V> m = type.getSerializer().deserialize(value, 
ByteBufferAccessor.instance);
-                // We depend on Maps to be properly sorted by their keys, so 
use a sorted map implementation here.
-                SortedMap<ByteBuffer, ByteBuffer> map = new 
TreeMap<>(type.getKeysType());
-                for (Map.Entry<K, V> entry : m.entrySet())
-                    map.put(type.getKeysType().decompose(entry.getKey()), 
type.getValuesType().decompose(entry.getValue()));
-                return new Value(map);
-            }
-            catch (MarshalException e)
-            {
-                throw new InvalidRequestException(e.getMessage());
-            }
-        }
-
-        @Override
-        public ByteBuffer get(ProtocolVersion version)
-        {
-            List<ByteBuffer> buffers = new ArrayList<>(2 * map.size());
-            for (Map.Entry<ByteBuffer, ByteBuffer> entry : map.entrySet())
-            {
-                buffers.add(entry.getKey());
-                buffers.add(entry.getValue());
-            }
-            return CollectionSerializer.pack(buffers, map.size());
-        }
-
-        public boolean equals(MapType<?, ?> mt, Value v)

Review Comment:
   No, I would simply say that we were not needing this equals anyway.



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