aweisberg commented on code in PR #2049:
URL: https://github.com/apache/cassandra/pull/2049#discussion_r1063723706


##########
src/java/org/apache/cassandra/cql3/conditions/ColumnCondition.java:
##########
@@ -579,6 +775,43 @@ private static boolean mapAppliesTo(MapType<?, ?> type, 
Iterator<Cell<?>> iter,
             // they're equal
             return operator == Operator.EQ || operator == Operator.LTE || 
operator == Operator.GTE;
         }
+
+        @Override
+        protected BoundKind kind()
+        {
+            return BoundKind.MULTI_CELL_COLLECTION;
+        }
+
+        private static final BoundSerializer<MultiCellCollectionBound> 
serializer = new BoundSerializer<MultiCellCollectionBound>()
+        {
+            @Override
+            public void serialize(MultiCellCollectionBound bound, 
DataOutputPlus out, int version) throws IOException
+            {
+                serializeList(bound.serializedValues().get(), out, version, 
vintNullableSerializer);
+            }
+
+            @Override
+            public MultiCellCollectionBound deserialize(DataInputPlus in, int 
version, ColumnMetadata column, Operator operator) throws IOException
+            {
+                List<ByteBuffer> values = deserializeList(in, version, 
vintNullableSerializer);
+                List<Terminal> terminals;
+                if (operator.isContains() || operator.isContainsKey())
+                {
+                    terminals = 
values.stream().map(Constants.Value::new).collect(toList());

Review Comment:
   Now you make me wonder if streams can magically see that it could also 
preallocate. Or it the entire stream you think is on the slow side?



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