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 5A0FA1099D for ; Fri, 20 Dec 2013 23:44:00 +0000 (UTC) Received: (qmail 50647 invoked by uid 500); 20 Dec 2013 23:43:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 50597 invoked by uid 500); 20 Dec 2013 23:43:57 -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 50587 invoked by uid 99); 20 Dec 2013 23:43:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Dec 2013 23:43:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of josh@keen.io designates 209.85.192.169 as permitted sender) Received: from [209.85.192.169] (HELO mail-pd0-f169.google.com) (209.85.192.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Dec 2013 23:43:53 +0000 Received: by mail-pd0-f169.google.com with SMTP id v10so3122002pde.14 for ; Fri, 20 Dec 2013 15:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=keen.io; s=google; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type; bh=AZVapKoF3Cc9HL5+Qrva24i8jE1mwCAcumBZIxj0uGc=; b=jrumRku/3ki6AfmSEFDV7MKd5UT8uLUA5ls+gVhcHtaBKa49gAKpqllGHFNSDNc3LE wv2esDaCHOa6/SniXoOIrz/TFolAvfrhJtjLksCFea1HuiWExEcoFZFKBHyCLG3svuf5 /SM+Jm2Br7Dzv7qedi9YUjoK8InOtnQWQoRbQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type; bh=AZVapKoF3Cc9HL5+Qrva24i8jE1mwCAcumBZIxj0uGc=; b=OQBIXYntR5XOB6qF6vNvzmOs4fKmsmLDK9Q9QkraLAqcze4J5Z+9UMkBzpjWARqKYY WFMZfhbLDbTdJJrgo8llgSWy7y5PPD2xdxbZoir+PD2JibaGPxgsUo5NZTGv08hWFEs2 IpAijWBuudOPCOEgOeX2+RZa9EeKEvM4L4832ZvZiKE0MNE+GuGTfHlq8uecMiycsAo7 vxsRN4OiI3K2dblgQ12aGznUViPQUg1/p0Jy6v0Tug4fFP6PMPYwFmySu5ih/29Xownj 7JvoOShJ8liayfCIHqiRmK6ZHUiXZyiAMmhh5LTrZgTCNYU4PLiFAM5B+MFaLykdmlQg 7liA== X-Gm-Message-State: ALoCoQkAhldNdtZ4m2dV0/wuT/FxPrFaPQbsgjqfXI7nRsRBypcySPBLTLGmWyUrEL7CAxH6kZHQ X-Received: by 10.66.119.172 with SMTP id kv12mr11829328pab.34.1387583012759; Fri, 20 Dec 2013 15:43:32 -0800 (PST) Received: from [192.168.128.57] ([173.247.206.130]) by mx.google.com with ESMTPSA id jk16sm16957821pbb.34.2013.12.20.15.43.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Dec 2013 15:43:32 -0800 (PST) Date: Fri, 20 Dec 2013 15:43:30 -0800 From: Josh Dzielak To: user@cassandra.apache.org Message-ID: <907790B2B04448DC876125169213ED4E@keen.io> In-Reply-To: References: <8DB123D233A54FE088FD836949D1B20C@keen.io> Subject: Re: Multi-Column Slice Query w/ Partial Component of Composite Key X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b4d622_39b7aaa2_f520" X-Virus-Checked: Checked by ClamAV on apache.org --52b4d622_39b7aaa2_f520 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Nate. =20 I will take a look at extending thrift, seems like this could be useful f= or some folks. =20 On =46riday, December 20, 2013 at 12:29 PM, Nate McCall wrote: > > =20 > > My questions =E2=80=93 > > =20 > > 1) Is this supported in the Thrift interface or CQL=3F > =20 > Not directly, no. =20 > =20 > > 2) If not, is there clever data modeling or indexing that could accom= plish this use case=3F 1 single-row round-trip to get these columns=3F > > =20 > =20 > =20 > If this is a query done frequently you could prefix both columns with a= static value, eg. =5B=22foo:username....=22, foo:city...=22, =22bar:othe= r=5Fcolumn:...=22=5D so in this specific case you look for 'foo:*' =20 > =20 > > 3) Is there plans to support this in the future=3F Generally, what is= the future of composite columns in a CQL world=3F > > =20 > =20 > You can always extend cassandra.thrift and add a custom method (not as = hard as it sounds - Thrift is designed for this). Side note: DataStax Ent= erprise works this way for reading the Cassandra=46ileSystem blocks. An e= arly prototype: =20 > https://github.com/riptano/brisk/blob/master/interface/brisk.thrift=23L= 68-L80 =20 > =20 > =20 > =20 > -- =20 > ----------------- > Nate McCall > Austin, TX > =40zznate > =20 > Co-=46ounder & Sr. Technical Consultant > Apache Cassandra Consulting > http://www.thelastpickle.com =20 --52b4d622_39b7aaa2_f520 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Thanks Nate.

I will take a look at extending= thrift, seems like this could be useful for some folks.
=20

On =46riday, December = 20, 2013 at 12:29 PM, Nate McCall wrote:


My questions =E2=80=93

1) Is= this supported in the Thrift interface or CQL=3F

Not directly, no. 
 
2) If not, is there clever data modeling or indexing that could acco= mplish this use case=3F 1 single-row round-trip to get these columns=3F

If this is a query done freque= ntly you could prefix both columns with a static value, eg. =5B=22foo:use= rname....=22, foo:city...=22, =22bar:other=5Fcolumn:...=22=5D so in this = specific case you look for 'foo:*'
 
3) Is there plan= s to support this in the future=3F Generally, what is the future of compo= site columns in a CQL world=3F


You can always exte= nd cassandra.thrift and add a custom method (not as hard as it sounds - T= hrift is designed for this). Side note: DataStax Enterprise works this wa= y for reading the Cassandra=46ileSystem blocks. An early prototype:
=

--
-----------------
Nate McCall
Austin, TX
=40= zznate

Co-=46ounder & Sr. Technical Consultant
Apache Cassa= ndra Consulting
http://www.thelastpickle.com
=20 =20 =20 =20 =20

--52b4d622_39b7aaa2_f520--