Ekaterina Dimitrova created CASSANDRA-19883:
-----------------------------------------------

             Summary: Update for NOT operator for 5.1 What's new page
                 Key: CASSANDRA-19883
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19883
             Project: Cassandra
          Issue Type: Task
            Reporter: Ekaterina Dimitrova


Below is a short summary of CASSANDRA-18584 that can be added to a What's new 
in 5.1 page when the time for that page comes.


{code:java}
CQL NOT CONTAINS, NOT CONTAINS KEY, != for map entries
    
    Ability to use NOT operator in filters on lists, sets and maps.
    Requires ALLOW FILTERING.
    
    All those operators can be mixed: i.e. you can use
    multiple CONTAINS, NOT CONTAINS, CONTAINS KEY, NOT CONTAINS KEY
    in a single WHERE clause.
    
    CQL NOT IN operator
    Ability to use NOT IN restrictions in CQL WHERE clause.
    Can be used on any column with ALLOW FILTERING.
    
    Can be also used on clustering columns w/o ALLOW FILTERING.
    Multicolumn NOT IN restrictions are supported
    (e.g. (c1, c2) NOT IN ((1, 2), (3, 4))).
    
    NOT IN restrictions are implemented as slice restrictions, therefore
    they can be merged with other slice restrictions using <, >, <=, >=.
    Also multiple NOT IN restrictions can be merged together.
    
    Allow CQL equals / non-equals operators in more places
    Now that we implemented NOT IN, both equals and non-equals
    can be rewritten as slices.
    
    column != value ---> column NOT IN (value)
    column  = value ---> column >= value AND column <= value
    
    And because slices can be freely merged, this opens room for
    many interesting queries that were previously
    impossible, e.g.:
    
    SELECT ... WHERE c1 != ?
    SELECT ... WHERE c1 != ? AND c1 != ? AND ...
    SELECT ... WHERE c1 = ? AND (c1, c2) != (v1, v2)
    SELECT ... WHERE c1 IN ? AND (c1, c2) != (v1, v2)
    
    We adhere to the Three Valued Logic
{code}

Of course the text can be tweaked but that is the TLDR, leaving it here so it 
does not get lost.
The CQL docs were updated adding the new operators



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to