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 C6AA6906B for ; Sat, 4 Feb 2012 03:16:39 +0000 (UTC) Received: (qmail 5532 invoked by uid 500); 4 Feb 2012 03:16:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 4356 invoked by uid 500); 4 Feb 2012 03:16:28 -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 4314 invoked by uid 99); 4 Feb 2012 03:16:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:16:25 +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 panov.andy@gmail.com designates 209.85.161.172 as permitted sender) Received: from [209.85.161.172] (HELO mail-gx0-f172.google.com) (209.85.161.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:16:16 +0000 Received: by ggnq2 with SMTP id q2so2573729ggn.31 for ; Fri, 03 Feb 2012 19:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=r7kZ8GURORqqbIur1D/2LA6CAPXl1kP8CPyYsZyED4M=; b=rFOlf3IyU1y4nvH6HopFL9WLADmAiysElL3S4hRPG0j7dA2cvR4ESQTNKbQhlLb6Kl gmDhqbpyx4W/jHKHWF096g+qvQ562ZWpCz4x187v5rJDMlKueJBrxQspHKrcKuLoc2vX VHglB9cAw0rP8FLOeO/kKfvUrq/pRSqMcXA0M= MIME-Version: 1.0 Received: by 10.236.154.232 with SMTP id h68mr15392730yhk.51.1328325355594; Fri, 03 Feb 2012 19:15:55 -0800 (PST) Received: by 10.236.180.38 with HTTP; Fri, 3 Feb 2012 19:15:55 -0800 (PST) In-Reply-To: References: Date: Sat, 4 Feb 2012 11:15:55 +0800 Message-ID: Subject: Re: yet a couple more questions on composite columns From: "Andrey V. Panov" To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf303dd29ef7627204b81ad89a X-Virus-Checked: Checked by ClamAV on apache.org --20cf303dd29ef7627204b81ad89a Content-Type: text/plain; charset=UTF-8 On 4 February 2012 06:21, Yiming Sun wrote: > I cannot have one composite column name with 3 components while another > with 4 components? Just put 4 components and left last empty (if it is same type)?! Another question I have is how flexible composite columns actually are. If > my data model has a CF containing US zip codes with the following composite > columns: > > {OH:Spring Field} : 45503 > {OH:Columbus} : 43085 > {FL:Spring Field} : 32401 > {FL:Key West} : 33040 > > I know I can ask cassandra to "give me the zip codes of all cities in OH". > But can I ask it to "give me the zip codes of all cities named Spring > Field" using this model? Thanks. > No. You set first composite component at first. --20cf303dd29ef7627204b81ad89a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 4 February 2012 06:21, Yiming Sun <yiming.sun@gmail= .com> wrote:
I cannot have one composite column name with 3 components while another wit= h 4 components?
=C2=A0Just put 4 components and left last = empty (if it is same type)?!

Another question I have is how flexible composite columns a= ctually are. =C2=A0If my data model has a CF containing US zip codes with t= he following composite columns:

{OH:Spring Field} = : 45503
{OH:Columbus} : 43085
{FL:Spring Field} : 32401
{F= L:Key West} =C2=A0: 33040

I know I can ask cassand= ra to "give me the zip codes of all cities in OH". =C2=A0But can = I ask it to "give me the zip codes of all cities named Spring Field&qu= ot; using this model? =C2=A0Thanks.
<= /div>No. You set first composite component at first.
--20cf303dd29ef7627204b81ad89a--