Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58628F6CB for ; Sun, 24 Mar 2013 06:33:19 +0000 (UTC) Received: (qmail 73949 invoked by uid 500); 24 Mar 2013 06:33:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 73544 invoked by uid 500); 24 Mar 2013 06:33:17 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 73495 invoked by uid 99); 24 Mar 2013 06:33:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Mar 2013 06:33:17 +0000 Date: Sun, 24 Mar 2013 06:33:17 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CASSANDRA-4354) Add default range constraint to prevent non-intuitive results when using composite key MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis resolved CASSANDRA-4354. --------------------------------------- Resolution: Cannot Reproduce > 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 For more information on JIRA, see: http://www.atlassian.com/software/jira