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 A3134101DC for ; Thu, 7 Nov 2013 12:14:14 +0000 (UTC) Received: (qmail 6671 invoked by uid 500); 7 Nov 2013 12:06:53 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 6539 invoked by uid 500); 7 Nov 2013 12:06:40 -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 6453 invoked by uid 99); 7 Nov 2013 12:06:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 12:06:31 +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 pavlikus@gmail.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 12:06:25 +0000 Received: by mail-wi0-f179.google.com with SMTP id hm4so483341wib.12 for ; Thu, 07 Nov 2013 04:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=HoHNxbFg9N6Y18baa566cRpmHTDyX+oLc5FjGSuz7UU=; b=gyDPsrwURD10Xsq97zey11N19tnwFTVKPlc/DlzeFBxYEKOWdewM4JKmMeLR7x0g2n HYYTKccpruZXE9T0+pPC0hdyIcVQi+6cLU9YRk8qI6gkyte15hlATQI5PLMJLU1ODtr8 fFNtSdP2EqE8cyVazbRCN9MqJq1mhExpvBneVp/wOayDqrA0rxTe6hXmFZhJbGrPKvMK ryjSbo8Lp1k/7A2jirwrZKgrwRYiJl4A0b6HlfbgloS9QLuzU8YrCHzi45bC5qZXkJgX ObhybHrlyIQAwbI9fbjd0JMwwYSlJA4Fyyg/MwEHf3sx+/t9eQhv9AAdmqWFmb31+0vD 47BQ== X-Received: by 10.194.20.230 with SMTP id q6mr6294369wje.49.1383825964788; Thu, 07 Nov 2013 04:06:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.21.167 with HTTP; Thu, 7 Nov 2013 04:05:44 -0800 (PST) From: "pavlikus@gmail.com" Date: Thu, 7 Nov 2013 14:05:44 +0200 Message-ID: Subject: Cannot restrict PRIMARY KEY part bucket_id by IN relation as a collection is selected by the query To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b5d971b0ff96704ea9517c6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d971b0ff96704ea9517c6 Content-Type: text/plain; charset=ISO-8859-1 Hey guys, just started to learn Cassandra recently, got a simple (hopefully) question on querying. There's a table with composite primary key - mdid and bucket_id. So I assume mdid is going to be a partition key and bucket_id is a clustering key. There're also two more columns to hold a text and a map. See http://pastie.org/private/fcygmm891hgg4ugyjhtjg for a full picture. So, I am basically going to have a big row with may buckets. In my application I am going to retrieve a subset of buckets, not all of them at once, so I do this: select .... where mdid='1' and bucket_id in ('global_props', 'test_bucket') But that gives the error in the subject. There's pretty interesting thing is that if I query for text column then the query works, while does not work for the map column. Check the two queries at the bottom http://pastie.org/private/fcygmm891hgg4ugyjhtjgplease. Should this be modelled in a different way in Cassandra? Could you please advice? Thanks, Pavlo --047d7b5d971b0ff96704ea9517c6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hey guys, just started to learn Cassandra recently, got a = simple (hopefully) question on querying.

There's a t= able with composite primary key - mdid and bucket_id. So I assume mdid is g= oing to be a partition key and bucket_id is a clustering key. There're = also two more columns to hold a text and a map. See http://pastie.org/private/fcygmm891hgg= 4ugyjhtjg for a full picture.

So, I am basically going to have a big row with may buc= kets. In my application I am going to retrieve a subset of buckets, not all= of them at once, so I do this:

select .... where mdid=3D'1' and bucket_id in ('global_props= 9;, 'test_bucket')

But that gives t= he error in the subject.

There's pretty intere= sting thing is that if I query for text column then the query works, while = does not work for the map column. Check the two queries at the bottom http://pastie.org/pr= ivate/fcygmm891hgg4ugyjhtjg please.

Should this be modelled in a different way in Cassandra= ? Could you please advice?

Thanks,=A0
Pa= vlo
--047d7b5d971b0ff96704ea9517c6--