incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Freeman <8fo...@gmail.com>
Subject Re: CQL and undefined columns
Date Mon, 05 Aug 2013 21:15:19 GMT
 From the Cassandra 1.2 Manual:

> Using the compact storage directive prevents you from adding more than 
> one column that is not part of
> the PRIMARY KEY.
>
> At this time, updates to data in a table created with compact storage 
> are not allowed. The table with
> compact storage that uses a compound primary key must define at least 
> one clustering column. Unless
> you specify WITH COMPACT STORAGE, CQL creates a table with non-compact 
> storage.
Note that CQL collection columns (e.g. map<>) can do something a lot 
like your CLI example.  Also note that your example doesn't even use 
"WITH COMPACT STORAGE", which I don't think would make any difference in 
that case.

Also, there's really no need to be snarky, respectful communication is 
much more appreciated.

On 08/05/2013 02:36 PM, Edward Capriolo wrote:
> "COMPACT STORAGE imposes the limit that you can't add columns to your 
> tables."
>
> Is absolutely false. If anything CQL is imposing the limits!
>
> Simple to prove. Try something like this:
>
> create table abc (x int);
> insert into abc (y) values (5);
>
> and watch CQL reject the insert saying something to the effect of 'y? 
> whats that? Did you mean CQL2 OR 1.5?, or hamburgers'
>
> Then go to the Cassandra cli and do this:
> create column family abd;
> set ['abd']['y']= '5';
> set ['abd']['z']='4';
>
> AND IT WORKS!
>
> I noticed the nomenclature starting to spring up around the term 
> "legacy tables" and docs based around "can't do with them". Frankly it 
> makes me nuts because...
>
> This little known web company named google produced a white paper 
> about what a ColumnFamily data model could do 
> http://en.wikipedia.org/wiki/BigTable . Cassandra was build on the 
> BigTable/ColumnFamily data model. There was also this big movement 
> called NoSQL, where people wanted to break free of query languages and 
> rigid schema's....
>
>
>
>
>
>
>
> On Mon, Aug 5, 2013 at 1:56 PM, Jonathan Haddad <jon@jonhaddad.com 
> <mailto:jon@jonhaddad.com>> wrote:
>
>     The CQL docs recommend not using it - I didn't just make that up.
>      :)  COMPACT STORAGE imposes the limit that you can't add columns
>     to your tables.  For those of us that are heavy CQL users, this
>     limitation is a total deal breaker.
>
>
>     On Mon, Aug 5, 2013 at 10:27 AM, Robert Coli <rcoli@eventbrite.com
>     <mailto:rcoli@eventbrite.com>> wrote:
>
>         On Wed, Jul 31, 2013 at 3:10 PM, Jonathan Haddad
>         <jon@jonhaddad.com <mailto:jon@jonhaddad.com>> wrote:
>
>             It's advised you do not use compact storage, as it's
>             primarily for backwards compatibility.
>
>
>         Many Apache Cassandra experts do not advise against using
>         COMPACT STORAGE. [1] Use CQL3 non-COMPACT STORAGE if you want
>         to, but there are also valid reasons to not use it. Asserting
>         that there is some good reason you should not use COMPACT
>         STORAGE (other than range ghosts?) seems inaccurate. :)
>         =Rob
>         [1]
>         http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/legacy_tables
>
>
>
>
>     -- 
>     Jon Haddad
>     http://www.rustyrazorblade.com
>     skype: rustyrazorblade
>
>


Mime
View raw message