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 27316D47B for ; Fri, 15 Mar 2013 11:51:00 +0000 (UTC) Received: (qmail 29179 invoked by uid 500); 15 Mar 2013 11:50:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 29044 invoked by uid 500); 15 Mar 2013 11:50:55 -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 29032 invoked by uid 99); 15 Mar 2013 11:50:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 11:50:55 +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 mishra.vivs@gmail.com designates 209.85.215.182 as permitted sender) Received: from [209.85.215.182] (HELO mail-ea0-f182.google.com) (209.85.215.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 11:50:49 +0000 Received: by mail-ea0-f182.google.com with SMTP id q15so1515668ead.41 for ; Fri, 15 Mar 2013 04:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=r2jaZXH6YHkdyw3fspGnhtw8TP3M1rsNWTb4ViY2ubc=; b=DYEPVzpy2GIUuSYDMxgbYm7AO7Nt747zFiAltIMK7qck2D/u7zjTu2y1LrwiGB4pav mxi6JsWzYRfWgtoP2xYwILA78SUvILxoKHZsEY/+HfLDbfbV4Cfu0Nqw5T1/24xE3mIZ Tv/NM5TW6GtQT0f9u5RbAcD3T1d1yfZTp7q2bonj8E/nNww2t300fgcwY1LfOYmqKkM2 o2Y8X5rXRMKONNBDutCKklbh0M7/GNmYRWSaYXnnn9GL1/R5jzQQ0dABi6avuna7wNVn t4EUJ+Root9ZOy1NmoGrbhvU9VbZs7vFdanlia3GiE2ZyOg+bU5mtqeAT3CSdd8txjKZ nuZg== MIME-Version: 1.0 X-Received: by 10.14.110.68 with SMTP id t44mr17379838eeg.25.1363348229281; Fri, 15 Mar 2013 04:50:29 -0700 (PDT) Received: by 10.223.68.196 with HTTP; Fri, 15 Mar 2013 04:50:29 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Mar 2013 17:20:29 +0530 Message-ID: Subject: Re: cql query not giving any result. From: Vivek Mishra To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=089e016818d4e97ca204d7f53e03 X-Virus-Checked: Checked by ClamAV on apache.org --089e016818d4e97ca204d7f53e03 Content-Type: text/plain; charset=ISO-8859-1 Ok. So it's a case when, CQL returns rowkey value as "key" and there is also column present with name as "key". Sounds like a bug? -Vivek On Fri, Mar 15, 2013 at 5:17 PM, Kuldeep Mishra wrote: > Hi Sylvain, > I created it using thrift client, here is column family creation > script, > > Cassandra.Client client; > CfDef user_Def = new CfDef(); > user_Def.name = "DOCTOR"; > user_Def.keyspace = "KunderaExamples"; > user_Def.setComparator_type("UTF8Type"); > user_Def.setDefault_validation_class("UTF8Type"); > user_Def.setKey_validation_class("UTF8Type"); > ColumnDef key = new ColumnDef(ByteBuffer.wrap("KEY".getBytes()), > "UTF8Type"); > key.index_type = IndexType.KEYS; > ColumnDef age = new ColumnDef(ByteBuffer.wrap("AGE".getBytes()), > "UTF8Type"); > age.index_type = IndexType.KEYS; > user_Def.addToColumn_metadata(key); > user_Def.addToColumn_metadata(age); > > client.set_keyspace("KunderaExamples"); > client.system_add_column_family(user_Def); > > > Thanks > KK > > > On Fri, Mar 15, 2013 at 4:24 PM, Sylvain Lebresne wrote: > >> On Fri, Mar 15, 2013 at 11:43 AM, Kuldeep Mishra < >> kuld.cs.mishra@gmail.com> wrote: >> >>> Hi, >>> Is it possible in Cassandra to make multiple column with same name ?, >>> like in this particular scenario I have two column with same name as "key", >>> first one is rowkey and second on is column name . >>> >>> >> No, it shouldn't be possible and that is your problem. How did you >> created that table? >> >> -- >> Sylvain >> >> >>> >>> Thanks and Regards >>> Kuldeep >>> >>> >>> On Fri, Mar 15, 2013 at 4:05 PM, Kuldeep Mishra < >>> kuld.cs.mishra@gmail.com> wrote: >>> >>>> >>>> Hi , >>>> Following cql query not returning any result >>>> cqlsh:KunderaExamples> select * from "DOCTOR" where key='kuldeep'; >>>> >>>> I have enabled secondary indexes on both column. >>>> >>>> Screen shot is attached >>>> >>>> Please help.... >>>> >>>> >>>> -- >>>> Thanks and Regards >>>> Kuldeep Kumar Mishra >>>> +919540965199 >>>> >>> >>> >>> >>> -- >>> Thanks and Regards >>> Kuldeep Kumar Mishra >>> +919540965199 >>> >> >> > > > -- > Thanks and Regards > Kuldeep Kumar Mishra > +919540965199 > --089e016818d4e97ca204d7f53e03 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ok. So it's a case =A0when, CQL returns rowkey value as "key"= and there is also column present with name as "key".

Sounds like a bug?

-Vivek

On Fri, Mar 15, 2013 at 5:17 PM, Kuldeep Mishra <kuld.cs.mishra@gma= il.com> wrote:
Hi Sylvain,
=A0=A0=A0=A0=A0 I created it using thrift client, here is co= lumn family creation script,
=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0 Cassan= dra.Client client;
=A0=A0=A0=A0=A0=A0=A0 CfDef user_Def =3D new CfDef();=
=A0=A0=A0=A0=A0=A0=A0 user_Def.name =3D "DOCTOR";
=A0=A0=A0=A0=A0=A0=A0 user_Def.keyspace =3D "KunderaExamples";=A0=A0=A0=A0=A0=A0=A0 user_Def.setComparator_type("UTF8Type");=A0=A0=A0=A0=A0=A0=A0 user_Def.setDefault_validation_class("UTF8Type= ");
=A0=A0=A0=A0=A0=A0=A0 user_Def.setKey_validation_class("UT= F8Type");
=A0=A0=A0=A0=A0=A0=A0 ColumnDef key =3D new ColumnDef(ByteBuffer.wrap("= ;KEY".getBytes()), "UTF8Type");
=A0=A0=A0=A0=A0=A0=A0 key= .index_type =3D IndexType.KEYS;
=A0=A0=A0=A0=A0=A0=A0 ColumnDef age =3D = new ColumnDef(ByteBuffer.wrap("AGE".getBytes()), "UTF8Type&q= uot;);
=A0=A0=A0=A0=A0=A0=A0 age.index_type =3D IndexType.KEYS;
=A0=A0=A0=A0=A0= =A0=A0 user_Def.addToColumn_metadata(key);
=A0=A0=A0=A0=A0=A0=A0 user_De= f.addToColumn_metadata(age);
=A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0= =A0=A0 client.set_keyspace("KunderaExamples");
=A0=A0=A0=A0=A0= =A0=A0 client.system_add_column_family(user_Def);


Thanks
KK


On Fri, Mar 15, 2013 at 4:24 PM, Sylvain Lebresne <sylvain@datastax.com> wrote:
On Fri, Mar 15, 2013 a= t 11:43 AM, Kuldeep Mishra <kuld.cs.mishra@gmail.com>= wrote:
Hi,
Is it possible in Cassandra to make m= ultiple column with same name ?, like in this particular scenario I have tw= o column with same name as "key", first one is rowkey and second = on is column name .


No, it shouldn't be possible= and that is your problem. How did you created that table?

--
Sylvain
=A0

Thanks and Regards
Kuldeep


On Fri, Mar 15, 2013 at 4:05 PM,= Kuldeep Mishra <kuld.cs.mishra@gmail.com> wrote:

Hi ,
=A0=A0=A0 Followi= ng cql query not returning any result
=A0=A0=A0 cqlsh:KunderaExamples>= ; select * from "DOCTOR" where key=3D'kuldeep';

=A0=A0 I have enabled secondary indexes on both column.

Screen shot is attached

Please help....


--
Thanks and Regards
Kuldeep Kumar Mishra
+9195= 40965199



--
Thanks an= d Regards
Kuldeep Kumar Mishra
+919540965199




--
Thanks and Regards
K= uldeep Kumar Mishra
+919540965199

--089e016818d4e97ca204d7f53e03--