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 AED3710590 for ; Wed, 4 Sep 2013 17:34:29 +0000 (UTC) Received: (qmail 60189 invoked by uid 500); 4 Sep 2013 17:34:27 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 60069 invoked by uid 500); 4 Sep 2013 17:34:26 -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 60061 invoked by uid 99); 4 Sep 2013 17:34:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 17:34:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of me@carllerche.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qc0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 17:34:19 +0000 Received: by mail-qc0-f171.google.com with SMTP id n1so345932qcw.2 for ; Wed, 04 Sep 2013 10:33:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=SM7ta9g97KM1YQLKSlKRGy4miBifrX2MaNldviJekik=; b=BEWeio5W/bkbt78QIXBEKaq/0Ze0QVyKSWDTie6yoBHKYuVgsOASoPJSyHcx+bAtCa Nn598WpukNfp/rEtU3efzbg3hlECc07hs0OcAzmJoaa0auWm2BEORf+ZNyywowVTjO0k z317Obpd7TPIGn0By7a/8Pwvqq4i3lK29GmCmBRTQz3jt1dy++DOWqbuW4TYp6J9Hqxg kYNsRBR3+rvRrfe7w+hdKrklCuM31RBxH/+jzb5tc0vFaapr+tRgBroR0a+REkFzb0Tm 0Q3ruzBv/rEB9aFMcRtHhJEjdZDmyssHgGGPIOcqU5n5CvcaabrnJn61wpWl9ZGWMgZN UKJA== X-Gm-Message-State: ALoCoQmbr5w9JXaF3UtyG7HcB2Up2rNyIbqa1+uVEXTTejFZmX2ztvlt3kj97U8JsRdlVQ+mJjUg MIME-Version: 1.0 X-Received: by 10.224.24.195 with SMTP id w3mr4717087qab.5.1378316033270; Wed, 04 Sep 2013 10:33:53 -0700 (PDT) Received: by 10.49.3.201 with HTTP; Wed, 4 Sep 2013 10:33:53 -0700 (PDT) X-Originating-IP: [208.87.61.246] In-Reply-To: References: Date: Wed, 4 Sep 2013 10:33:53 -0700 Message-ID: Subject: Re: Selecting multiple rows with composite partition keys using CQL3 From: Carl Lerche To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a11c2ba708d392e04e59235b6 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2ba708d392e04e59235b6 Content-Type: text/plain; charset=ISO-8859-1 I can't find a way to do this with the current implementation of CQL3. Are there any plans to add an OR feature to CQL3 or some other way to select a batch of disjoint composite keys? On Fri, Aug 30, 2013 at 7:52 PM, Carl Lerche wrote: > Hello, > > I've been trying to figure out how to port my application to CQL3 based on > http://cassandra.apache.org/doc/cql3/CQL.html. > > I have a table with a primary key: ( (app, name), timestamp ). So, the > partition key would be composite (on app and name). I'm trying to figure > out if there is a way to select multiple rows that span partition keys. > Basically, I am trying to do: > > SELECT .. WHERE (app = 'foo' AND name = 'bar' AND timestamp = 123) OR (app > = 'foo' AND name='hello' AND timestamp = 123) > --001a11c2ba708d392e04e59235b6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I can't find a way to do this with the current impleme= ntation of CQL3. Are there any plans to add an OR feature to CQL3 or some o= ther way to select a batch of disjoint composite keys?


On Fri, Aug 30, 2013 at 7:52 PM, Carl Le= rche <me@carllerche.com> wrote:
Hello,

I've been trying to figure o= ut how to port my application to CQL3 based on=A0http://cassandra.apache.o= rg/doc/cql3/CQL.html.

I have a table with a primary key: ( (app, name), times= tamp ). So, the partition key would be composite (on app and name). I'm= trying to figure out if there is a way to select multiple rows that span p= artition keys. Basically, I am trying to do:

SELECT .. WHERE (app =3D 'foo' AND name =3D = 9;bar' AND timestamp =3D 123) OR (app =3D 'foo' AND name=3D'= ;hello' AND timestamp =3D 123)

--001a11c2ba708d392e04e59235b6--