You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/04/07 14:17:13 UTC

[GitHub] [cassandra] Ankou76ers commented on a diff in pull request #1380: CASSANDRA-10537: CONTAINS and CONTAINS KEY support for Lightweight Transactions

Ankou76ers commented on code in PR #1380:
URL: https://github.com/apache/cassandra/pull/1380#discussion_r845192455


##########
test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionCollectionsTest.java:
##########
@@ -433,21 +433,35 @@ public void testUDTField() throws Throwable
 
     void checkAppliesUDT(String condition, Object value) throws Throwable
     {
+        // UPDATE statement
         assertRows(execute("UPDATE %s SET v = ? WHERE k = 0 IF " + condition, value), row(true));
         assertRows(execute("SELECT * FROM %s"), row(0, value));
+        // DELETE statement
+        assertRows(execute("DELETE FROM %s WHERE k = 0 IF " + condition), row(true));
+        assertEmpty(execute("SELECT * FROM %s"));
+        execute("INSERT INTO %s (k, v) VALUES (0, ?)", value);
     }

Review Comment:
   I'm not a big fan of adding complexity in these simple check but I did not find a better way to do it for now 



-- 
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-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org