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 F402DD976 for ; Wed, 15 Aug 2012 21:02:37 +0000 (UTC) Received: (qmail 29046 invoked by uid 500); 15 Aug 2012 21:02:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 29015 invoked by uid 500); 15 Aug 2012 21:02:35 -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 29003 invoked by uid 99); 15 Aug 2012 21:02:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2012 21:02:35 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a47.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2012 21:02:29 +0000 Received: from homiemail-a47.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a47.g.dreamhost.com (Postfix) with ESMTP id 36555284057 for ; Wed, 15 Aug 2012 14:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h= content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s= thelastpickle.com; bh=fatRbP+tAjCdvVy7vdXq+uZfPDE=; b=J5Svpms8+d 4X5h7+DGg3Ni3G+DSbBGzBzKZZrrCOg2C3r2BXk2XEmhJhzLVuH7G5lp+AyA/6aK exkLMiQ1AK/Ft/r6g3B2NuUMid28ZS4zWaah5cmkVXhW91mn9hFGGHSA/WZ6r7OQ fS94UYn8oxLmmWKKI5PGA6Sr0vOF53CBs= Received: from [172.16.1.10] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a47.g.dreamhost.com (Postfix) with ESMTPSA id CE3F7284055 for ; Wed, 15 Aug 2012 14:02:06 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1485\)) Subject: Re: Partial composite result limit possible? From: aaron morton In-Reply-To: <372132B6-F983-4573-902F-232382DD8520@broodax.net> Date: Thu, 16 Aug 2012 09:02:05 +1200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <372132B6-F983-4573-902F-232382DD8520@broodax.net> To: user@cassandra.apache.org X-Mailer: Apple Mail (2.1485) You cannot do that in a single query.=20 The order of columns in output is the order they are stored in. And the = API can only return a contiguous range of columns. =20 In this case I would get the larger slice and then discard columns = client side. Or build a second row that has the order of the columns = reversed so you can select from (0, null) to (2, null). = http://pycassa.github.com/pycassa/assorted/composite_types.html?#fetching-= compositetype-data Hope that helps.=20 ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/08/2012, at 4:10 PM, David Turnbull wrote: > Hi, I have a CF with a composite type (LongType, IntegerType) with = some data like this: >=20 > RowKey: hihi > =3D> (column=3D1000:1, value=3D616263) > =3D> (column=3D1000:2, value=3D6465) > =3D> (column=3D1000:3, value=3D66) > =3D> (column=3D1000:4, value=3D6768) > =3D> (column=3D2000:1, value=3D616263) > =3D> (column=3D2000:2, value=3D6465) > =3D> (column=3D2000:3, value=3D66) > =3D> (column=3D2000:4, value=3D6768) >=20 > I want to query from (1000,0 to 2000,2) such that I get 1000:1, = 1000:2, 2000:1 and 2000:2 back. > Is this possible? >=20 > In pycassa, I can do cf.get('hihi', column_start=3D(1000,0), = column_finish=3D(2000,2) but that gives me 1000:1-4 and 2000:1-2. > Specifying a limit of 2 columns for the query just applies to the = total results, i.e. only 1000:1 and 1000:2. >=20 > I could specify the composite columns fully in the query, but I'm = hoping to query over at least 300 columns, which seems bad. >=20