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 194901750A for ; Thu, 29 Jan 2015 09:32:35 +0000 (UTC) Received: (qmail 74160 invoked by uid 500); 29 Jan 2015 09:32:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 74124 invoked by uid 500); 29 Jan 2015 09:32:35 -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 74112 invoked by uid 99); 29 Jan 2015 09:32:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 09:32:35 +0000 Date: Thu, 29 Jan 2015 09:32:35 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7855) Genralize use of IN for compound partition keys 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-7855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-7855: -------------------------------------- Fix Version/s: (was: 2.1.3) 3.0 > Genralize use of IN for compound partition keys > ----------------------------------------------- > > Key: CASSANDRA-7855 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7855 > Project: Cassandra > Issue Type: Improvement > Reporter: Sylvain Lebresne > Assignee: Benjamin Lerer > Priority: Minor > Labels: cql > Fix For: 3.0 > > > When you have a compount partition key, we currently only support to have a {{IN}} on the last column of that partition key. So given: > {noformat} > CREATE TABLE foo ( > k1 int, > k2 int, > v int, > PRIMARY KEY ((k1, k2)) > ) > {noformat} > we allow > {noformat} > SELECT * FROM foo WHERE k1 = 0 AND k2 IN (1, 2) > {noformat} > but not > {noformat} > SELECT * FROM foo WHERE k1 IN (0, 1) AND k2 IN (1, 2) > {noformat} > There is no particular reason for us not supporting the later (to the best of my knowledge) since it's reasonably straighforward, so we should fix it. > I'll note that using {{IN}} on a partition key is not necessarily a better idea than parallelizing queries server client side so this syntax, when introduced, should probably be used sparingly, but given we do support IN on partition keys, I see no reason not to extend it to compound PK properly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)