title: CQL3 Collections with Compact Storage?
body: <p>This question is about <a href="http://www.datastax.com/dev/blog/thrift-to-cql3" rel="nofollow">this</a> article of Datastax. In its "Non compact tables" sub-topic, it says </p>
  
  <blockquote>
    <p>The difference is that the definition above will internally use a CompositeType comparator with a single UTF8Type component, instead of an UTF8Type comparator. This may seem wasteful (technically, the use of CompositeType adds 2 bytes of overhead per internal cells (hence the compact/non-compact terms)), but the reason for that is collections support. Internally, collections require the use of CompositeType.</p>
  </blockquote>
  
  <p>My question is about the last line. It says Collections need CompositeType comparator. In the example given in above quote, when we use compact storage, it doesn't give a CompositeType comparator, but a UTF8Type comparator. So collections can't be used with that. I get that. </p>
  
  <p>But, if you have 2 PRIMARY KEYS, you get CompositeType comparator even with Compact Storage. Then why can't we have collections in that case?</p>
  
  <p>A possible reason would be having a CompositeType comparator is not the only requirement for Collections. If it is, what are the other requirements?</p>
  
  <p>Thanks.</p>