maedhroz commented on code in PR #2049:
URL: https://github.com/apache/cassandra/pull/2049#discussion_r1060979209
##########
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:
```suggestion
assertFalse(conditionUDTApplies(list(ONE), EQ, null));
```
A few more redundant casts on `null` below, but will just mention it here.
On the other hand, it is kind of a nice bit of "documentation" :)
--
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]