On Sun, Jan 4, 2015 at 12:48 AM, Sylvain Wallez <sylv...@apache.org> wrote:

>  Indeed this makes sense for map keys and set values, but AFAIU from the
> docs this also applies to map and list _values_: " The maximum size of an
> item in a collection is 64K"
>

Somehow it appears that from Jack's quote you've only read what was in the
parenthesis. The part that was not in parenthesis was:
  "Collections values are currently limited to 64K because the serialized
form used uses shorts to encode the elements length"

That's a limitation of the binary protocol if you will, not an internal
storage one.

I'll add that this protocol limitation has in fact already be lifted in the
v3 of the protocol (so C* 2.1) but documentation may not be entirely up to
date yet.



>
>
> http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_collections_c.html
>
> Or are collection values also represented as keys?
>
> Sylvain
>
> Le 03/01/2015 20:50, Jack Krupansky a écrit :
>
> See: https://issues.apache.org/jira/browse/CASSANDRA-5355
>
>  "Collections values are currently limited to 64K because the serialized
> form used uses shorts to encode the elements length (and for sets elements
> and key map, because they are part of the internal column name that is
> itself limited to 64K)."
>
>  -- Jack Krupansky
>
> On Sat, Jan 3, 2015 at 2:31 PM, Sylvain Wallez <sylv...@apache.org> wrote:
>
>>  From what I understand from the docs, the 64k limit applies to both the
>> number of items in a collection and the size of its elements?
>>
>> Why is there a constraint on value size in collections, when other types
>> such as blob or text can be larger?
>>
>> Thanks,
>> Sylvain
>>
>> Le 01/01/2015 20:04, DuyHai Doan a écrit :
>>
>> Storage-engine wise, they are almost equivalent, thought there are some
>> minor differences:
>>
>>  1) with Set structure, you cannot store more that 64kb worth of data
>> 2) collections and maps are loaded entirely by Cassandra for each query,
>> whereas with clustering columns you can select a slice of columns
>>
>>
>>
>> On Thu, Jan 1, 2015 at 7:46 PM, Kevin Burton <bur...@spinn3r.com> wrote:
>>
>>> I think the two tables are the same.  Correct?
>>>
>>>  create table foo (
>>>
>>>      source text,
>>>     target text,
>>>     primary key( source, target )
>>> )
>>>
>>>
>>>  vs
>>>
>>>   create table foo (
>>>
>>>      source text,
>>>     target set<text>,
>>>     primary key( source )
>>> )
>>>
>>>  … meaning that the first one, under the covers is represented the same
>>> as the second.  As a slice.
>>>
>>>  Am I correct?
>>>
>>>  --
>>>   Founder/CEO Spinn3r.com
>>>  Location: *San Francisco, CA*
>>>  blog: http://burtonator.wordpress.com
>>> … or check out my Google+ profile
>>> <https://plus.google.com/102718274791889610666/posts>
>>>  <http://spinn3r.com>
>>>
>>
>>
>>
>>   --
>> Sylvain Wallez - http://bluxte.net
>>
>>
>
>
> --
> Sylvain Wallez - http://bluxte.net
>
>

Reply via email to