cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6839) Support non equal conditions (for LWT)
Date Fri, 27 Jun 2014 09:27:24 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045746#comment-14045746
] 

Sylvain Lebresne commented on CASSANDRA-6839:
---------------------------------------------

* In {{ColumnCondition}}, can't we reuse {{value}} instead of adding {{inMarker}}? That would
slightly simplify the logic in {{collectMarkerSpecification}}.
* In {{inValuesAreEqual}}, can't we use the TreeSet equals methods (rather than iterating).
* I think I would have had a preference for splitting the IN cases into specific Bound subclasses.
This might duplicate a small amount of code but it feels cleaner to me overall.
* For collections, it occurred to me that "a condition like 'IF l[ 3] = null' can only be
false" is not the most intuitive/correct way to handle it. This condition should be true if
the size of the list is <= 3. Similarly for maps, it should be true if the map have no
value for the given key (since null means no values in CQL). I realise this is not introduced
by this patch, and I suppose we could create a separate ticket, but maybe it's worth saving
ourselves some time by fixing it here since we need to handle 'IF l[ 3] != null' anyway and
could just handle nulls in {{Bound.compareWithOperator}} and simplify {{isSatifiedByValue}}
accordingly.


> Support non equal conditions (for LWT)
> --------------------------------------
>
>                 Key: CASSANDRA-6839
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6839
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Tyler Hobbs
>            Priority: Minor
>             Fix For: 2.0.9
>
>         Attachments: 6839-v2.txt, 6839.txt
>
>
> We currently only support equal conditions in conditional updates, but it would be relatively
trivial to support non-equal ones as well. At the very least we should support '>', '>=',
'<' and '<=', though it would probably also make sense to add a non-equal relation too
('!=').



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message