[ https://issues.apache.org/jira/browse/CASSANDRA-10537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525471#comment-17525471 ]
Berenguer Blasi commented on CASSANDRA-10537: --------------------------------------------- Committed! thanks a lot [~Antoine Rocheteau] for your work and patience with our CI which has been a bit difficult these days :-) [j11|https://app.circleci.com/pipelines/github/bereng/cassandra/646/workflows/e6563adc-8346-41d5-982c-01e8249c96c8] CI [j8|https://app.circleci.com/pipelines/github/bereng/cassandra/646/workflows/d2ed1a1f-bdb5-4c18-8d30-96985cabdd23] CI C* [committed|https://github.com/apache/cassandra/commit/d80bb323c9dd8f814fe02e16dec510557c7d5101] dtest [committed|https://github.com/apache/cassandra-dtest/commit/5e06a1f5c192670b586abf8d1a68e4f884ba4e42] > CONTAINS and CONTAINS KEY support for Lightweight Transactions > -------------------------------------------------------------- > > Key: CASSANDRA-10537 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10537 > Project: Cassandra > Issue Type: Improvement > Components: Legacy/CQL > Reporter: Nimi Wariboko Jr. > Assignee: ROCHETEAU Antoine > Priority: Normal > Labels: AdventCalendar2021, CQL, lhf > Fix For: 4.x > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Conditional updates currently do not support CONTAINS and CONTAINS KEY > conditions. Queries such as > {{UPDATE mytable SET somefield = 4 WHERE pk = 'pkv' IF set_column CONTAINS > 5;}} > are not possible. > Would it also be possible to support the negation of these (ex. testing that > a value does not exist inside a set)? > +Additional Information for newcomers:+ > Negation should not be supported as for the moment we do not support it > within restrictions either. > One way to approch this bug is to use test driven development. You can modify > {{InsertUpdateIfConditionCollectionsTest}} to allow CONTAINS and CONTAINS KEY > operators and go through the different failures. > The following changes will need to be done. > * The {{columnCondition}} rule from the ANTLR {{Parser.g}} file should be > updated to accept {{containsOperator}}. > * {{ColumnCondition.Raw#prepareTerms}} should be modified in the case where > the operator is a CONTAINS or CONTAINS KEY as the {{receiver}} is not the > collection but keys or values of the collection. Look at > {{SingleColumnRelation#makeCollectionReceiver}}. > * {{ColumnCollection.MultiCellCollectionBound#valueAppliesTo}} will need to > be changed for {{Map}} and {{Set}} to process CONTAINS operators. > -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org