Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDCFCC81B for ; Fri, 11 May 2012 16:44:20 +0000 (UTC) Received: (qmail 77815 invoked by uid 500); 11 May 2012 16:44:18 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 77788 invoked by uid 500); 11 May 2012 16:44:18 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 77779 invoked by uid 99); 11 May 2012 16:44:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 16:44:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.44] (HELO mail-vb0-f44.google.com) (209.85.212.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 16:44:10 +0000 Received: by vbbez10 with SMTP id ez10so3526398vbb.31 for ; Fri, 11 May 2012 09:43:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:x-gm-message-state; bh=K76tcoB3X1o1GKdaah+d44XVx1AMUJDBIgYCpZdcaFU=; b=c6nbjzvyf1gVuzLObcQievGOYG06BNIK3M5dOuyjxIK24DsJUB/47YR0GfXDm7N/u3 1Vx3066wtLCyKIbp3DBD1pDdyqKG+yGrZ+2YO8dLqhFahFH8cjqassYtJdxV6vCT1pd9 iDehGzVdWtovlWJ2eXZeOg3YkSLBWzWE++jkKQq0DqubFOWekly82gY/8qUNc/Wl3GCn 1coBpqf+0PElqAJTe+NZXt+tlouKMBkAiIB9/CHhm9VFMkjEIgtkw9mkXKosW+erAXgs HkW5GFGuSzfkdaLv01DJpPQGs2BXhDwdYqo88e9/RfaFFsEYH8qSKgRTb+SMAz+8TfpU h5eQ== MIME-Version: 1.0 Received: by 10.220.107.208 with SMTP id c16mr838141vcp.65.1336754629560; Fri, 11 May 2012 09:43:49 -0700 (PDT) Sender: roland.mechler@extjs.com Received: by 10.52.107.100 with HTTP; Fri, 11 May 2012 09:43:49 -0700 (PDT) Date: Fri, 11 May 2012 09:43:49 -0700 X-Google-Sender-Auth: _9IZP0y2M2TB3O_0rWzMgubBeTQ Message-ID: Subject: Select on indexed columns and with IN clause for the PRIMARY KEY From: Roland Mechler To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d04389333d8ca1304bfc570a2 X-Gm-Message-State: ALoCoQn6hL5wbUnVdFX/+rP2e6euBVP0aIA46NcCA+vmMFjhccD5bltT3l9IuSeMquK6AAuf6Lr9 --f46d04389333d8ca1304bfc570a2 Content-Type: text/plain; charset=ISO-8859-1 I am using C* 1.1 and CQL 3.0. Am trying to do a select with an IN clause for the primary key, and on an indexed column, which appears to not be supported: cqlsh:Keyspace1> SELECT * FROM TestTable WHERE id IN ('1', '2') AND data = 'b'; Bad Request: Select on indexed columns and with IN clause for the PRIMARY KEY are not supported Any chance this will be supported in the future? Full example: cqlsh:Keyspace1> CREATE TABLE TestTable (id text PRIMARY KEY, data text); cqlsh:Keyspace1> CREATE INDEX ON TestTable (data); cqlsh:Keyspace1> INSERT INTO TestTable (id, data) VALUES ('1', 'a'); cqlsh:Keyspace1> INSERT INTO TestTable (id, data) VALUES ('2', 'b'); cqlsh:Keyspace1> INSERT INTO TestTable (id, data) VALUES ('3', 'b'); cqlsh:Keyspace1> SELECT * FROM TestTable WHERE id IN ('1', '2'); id | data ----+------ 1 | a 2 | b cqlsh:Keyspace1> SELECT * FROM TestTable WHERE data = 'b'; id | data ----+------ 3 | b 2 | b cqlsh:Keyspace1> SELECT * FROM TestTable WHERE id IN ('1', '2') AND data = 'b'; Bad Request: Select on indexed columns and with IN clause for the PRIMARY KEY are not supported cqlsh:Keyspace1> -Roland --f46d04389333d8ca1304bfc570a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am using C* 1.1 and CQL 3.0. Am trying to do a select with an IN clause f= or the primary key, and on an indexed column, which appears to not be suppo= rted:

=A0 =A0 cqlsh:Keyspace1> SELECT * FROM Tes= tTable WHERE id IN ('1', '2') AND data =3D 'b';
=A0 =A0 Bad Request: Select on indexed columns and with IN clause for = the PRIMARY KEY are not supported

Any chance= this will be supported in the future?


<= div> Full example:

cqlsh:Keyspace1> CREATE TABL= E TestTable (id text PRIMARY KEY, data text);
cqlsh:Keyspace1>= CREATE INDEX ON TestTable (data);
cqlsh:Keyspace1> INSERT INT= O TestTable (id, data) VALUES ('1', 'a');
cqlsh:Keyspace1> INSERT INTO TestTable (id, data) VALUES ('2= 9;, 'b');
cqlsh:Keyspace1> INSERT INTO TestTable (id, = data) VALUES ('3', 'b');
cqlsh:Keyspace1> SELE= CT * FROM TestTable WHERE id IN ('1', '2');
=A0id | data
----+------
=A0 1 | =A0 =A0a
=A0 2 | =A0 =A0b

cqlsh:Keyspace1> SELECT * FR= OM TestTable WHERE data =3D 'b';
=A0id | data
-= ---+------
=A0 3 | =A0 =A0b
=A0 2 | =A0 =A0b

c= qlsh:Keyspace1> SELECT * FROM TestTable WHERE id IN ('1', '2= ') AND data =3D 'b';
Bad Request: Select on indexed c= olumns and with IN clause for the PRIMARY KEY are not supported
cqlsh:Keyspace1>=A0

-Roland

--f46d04389333d8ca1304bfc570a2--