Leonid Ilyevsky created CASSANDRA-4354:
------------------------------------------

             Summary: Add default range constraint to prevent non-intuitive 
results when using composite key
                 Key: CASSANDRA-4354
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4354
             Project: Cassandra
          Issue Type: New Feature
          Components: Core
    Affects Versions: 1.1.1
         Environment: Any
            Reporter: Leonid Ilyevsky


When ByteOrderedPartitioner is used, and the table has a composite primary key, 
the result of the query may be logically incorrect if only one inequality is 
specified.
For example, let say x and y are components of the key. The query with the 
predicate like "x = ?" will give correct answer, as well as "x = ? and y >= ? 
and y <= ?".
However, the predicate "x = ? and y >= ?" will give the result where we may see 
different values of x.
This behavior is understandable because we know how the composite key is used 
internally, but it is very confusing for users with sql experience, and indeed 
is very inconvenient overall.
This can me easily fixed by automatically adding the complementary inequality 
constraint, using bit sequence of all zeroes or all ones, depending on the side.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to