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


##########
test/unit/org/apache/cassandra/cql3/conditions/ColumnConditionTest.java:
##########
@@ -611,5 +882,96 @@ public void testMapCollectionBoundIsSatisfiedByValue() 
throws InvalidRequestExce
         assertTrue(conditionContainsApplies(map(ONE, 
ByteBufferUtil.EMPTY_BYTE_BUFFER), CONTAINS_KEY, ONE));
         assertFalse(conditionContainsApplies(map(ONE, 
ByteBufferUtil.EMPTY_BYTE_BUFFER), CONTAINS_KEY, 
ByteBufferUtil.EMPTY_BYTE_BUFFER));
 
+        // Element access
+        assertTrue(conditionElementApplies(map(ZERO, ONE), ZERO, EQ, ONE));
+        assertFalse(conditionElementApplies(map(ZERO, ONE), ZERO, EQ, TWO));
+        assertFalse(conditionElementApplies(map(ZERO, ONE), ONE, EQ, TWO));
+        assertFalse(conditionElementApplies(map(), ZERO, EQ, TWO));
+    }
+
+    @Test
+    public void testMultiCellUDTBound() throws InvalidRequestException
+    {
+        // EQ
+        assertTrue(conditionUDTApplies(list(ONE), EQ, list(ONE)));
+        assertFalse(conditionUDTApplies(list(ONE), EQ, list(ZERO)));
+        assertFalse(conditionUDTApplies(list(ZERO), EQ, list(ONE)));
+        assertFalse(conditionUDTApplies(list(ONE, ONE), EQ, list(ONE)));
+        assertFalse(conditionUDTApplies(list(ONE), EQ, list(ONE, ONE)));
+        assertFalse(conditionUDTApplies(list(ONE), EQ, list()));
+
+        assertFalse(conditionUDTApplies(list(ONE), EQ, 
(List<ByteBuffer>)null));

Review Comment:
   I think there were cases where the cast makes explicit which function to 
call that would otherwise be ambiguous. Some were definitely not needed and I 
removed those.



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