For more specifically, I declared a column family create column family Column_Family with key_validation_class = UTF8Type and comparator = 'CompositeType(LongType,UTF8Type)' and default_validation_class = UTF8Type;
Number of columns will depend on only first column name in composite column or both. For example, With row key = 1, I have data 1 | 20140813, user1 | value1 1 | 20140813, user2 | value2 1 | 20140814, user1 | value3 1 | 20140814, user2 | value4 (1: rowkey, "20140813, user1": composite column, "value1" : the value of column) So the number of columns of row key 1 will be 2 or 4? (2 for 20140813 and 20140814, 4 for each distinct composite column) Thank you so much On 13 August 2014 03:18, Jack Krupansky <j...@basetechnology.com> wrote: > Your question is a little too tangled for me... Are you asking about > rows in a partition (some people call that a “storage row”) or columns per > row? The latter is simply the number of columns that you have declared in > your table. > > The total number of columns – or more properly, “cells” – in a partition > would be the number of rows you have inserted in that partition times the > number of columns you have declared in the table. > > If you need to review the terminology: > http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows > > -- Jack Krupansky > > *From:* hlqv <hlqvu...@gmail.com> > *Sent:* Tuesday, August 12, 2014 1:13 PM > *To:* user@cassandra.apache.org > *Subject:* Number of columns per row for composite columns? > > Hi everyone, > I'm confused with number of columns in a row of Cassandra, as far as I > know there is 2 billions columns per row. Like that if I have a composite > column name in each row, for ex: (timestamp, userid), then number of > columns per row is the number of distinct 'timestamp' or each distinct > 'timestamp, userid' is a column? >