incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Mishra <mishra.v...@gmail.com>
Subject Re: cql query not giving any result.
Date Fri, 15 Mar 2013 11:50:29 GMT
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 <kuld.cs.mishra@gmail.com>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 <sylvain@datastax.com>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
>

Mime
View raw message