Search code examples
sqlcollectionscassandracqlcql3

Select subsets of collection type values


Using CQL3 collection types, how can I select parts of a collection? There are examples given to update and set collection types, but it doesn't seem possible to only query subsets of the values in such a type.


Solution

  • You can't select a specific element within a collection (yet).

    Docs
    You can only retrieve a collection in its entirety. And while we may (or may not) relax that rule a bit in the future, this still means that collections are not meant to be excessively large. They are not a replacement for a proper modelisation into tables.