CQL is too limiting and negates the power of storing arbitrary data types
in dynamic columns.

I agree but partly. You can always create column family with key, column
and value and store any number of arbitrary columns as column name in
"column" and it's corresponding value with "value".  I find it much easier.

Coming back to original question, i think differentiator is the column
metadata is treated in thrift and CQL3. What i do not understand is, for
same column family if maintaining two set of metadata
objects(CqlMetadata,CFDef), why updating anyone would cause trouble for
another!

-Vivek


On Fri, Aug 30, 2013 at 11:23 PM, Peter Lin <wool...@gmail.com> wrote:

>
> my bias perspective, I find the sweet spot is thrift for insert/update and
> CQL for select queries.
>
> CQL is too limiting and negates the power of storing arbitrary data types
> in dynamic columns.
>
>
> On Fri, Aug 30, 2013 at 1:45 PM, Jon Haddad <j...@jonhaddad.com> wrote:
>
>> If you're going to work with CQL, work with CQL.  If you're going to work
>> with Thrift, work with Thrift.  Don't mix.
>>
>> On Aug 30, 2013, at 10:38 AM, Vivek Mishra <mishra.v...@gmail.com> wrote:
>>
>> Hi,
>> If i a create a table with CQL3 as
>>
>> create table user(user_id text PRIMARY KEY, first_name text, last_name
>> text, emailid text);
>>
>> and create index as:
>> create index on user(first_name);
>>
>> then inserted some data as:
>> insert into user(user_id,first_name,last_name,"emailId")
>> values('@mevivs','vivek','mishra','vivek.mis...@impetus.co.in');
>>
>>
>> Then if update same column family using Cassandra-cli as:
>>
>> update column family user with key_validation_class='UTF8Type' and
>> column_metadata=[{column_name:last_name, validation_class:'UTF8Type',
>> index_type:KEYS},{column_name:first_name, validation_class:'UTF8Type',
>> index_type:KEYS}];
>>
>>
>> Now if i connect via cqlsh and explore user table, i can see column
>> first_name,last_name are not part of table structure anymore. Here is the
>> output:
>>
>> CREATE TABLE user (
>>   key text PRIMARY KEY
>> ) WITH
>>   bloom_filter_fp_chance=0.010000 AND
>>   caching='KEYS_ONLY' AND
>>   comment='' AND
>>   dclocal_read_repair_chance=0.000000 AND
>>   gc_grace_seconds=864000 AND
>>   read_repair_chance=0.100000 AND
>>   replicate_on_write='true' AND
>>   populate_io_cache_on_flush='false' AND
>>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>>   compression={'sstable_compression': 'SnappyCompressor'};
>>
>> cqlsh:cql3usage> select * from user;
>>
>>  user_id
>> ---------
>>  @mevivs
>>
>>
>>
>>
>>
>> I understand that, CQL3 and thrift interoperability is an issue. But this
>> looks to me a very basic scenario.
>>
>>
>>
>> Any suggestions? Or If anybody can explain a reason behind this?
>>
>> -Vivek
>>
>>
>>
>>
>>
>>
>

Reply via email to