Skip to content

Conversation

@dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Jan 31, 2026

Summary

  • Add frozen parameter to List, Set, and Map collection columns in cqlengine
  • When frozen=True, collection is wrapped as frozen<collection>
  • Indexes on frozen collections use FULL(column) instead of implicit VALUES indexing

Example Usage

class MyModel(Model):
    id = columns.Integer(primary_key=True)
    items = columns.List(columns.Text, frozen=True, index=True)

Generates:

CREATE TABLE mymodel (id int PRIMARY KEY, items frozen<list<text>>);
CREATE INDEX ON mymodel (FULL(items));

Test plan

  • Unit tests added for frozen parameter on List, Set, and Map
  • Unit tests verify correct db_type generation
  • Integration tests needed to verify table/index creation with ScyllaDB

Fixes #677

Add a `frozen` parameter to List, Set, and Map collection columns in
cqlengine. When `frozen=True`, the collection is wrapped as
`frozen<collection>` and indexes use `FULL(column)` instead of the
implicit VALUES indexing.

This enables creating frozen collections with FULL indexes:

    class MyModel(Model):
        items = columns.List(columns.Text, frozen=True, index=True)

Generates:
    CREATE TABLE mymodel (items frozen<list<text>>);
    CREATE INDEX ON mymodel (FULL(items));

Fixes #677

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dkropachev dkropachev self-assigned this Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support frozen collections with FULL indexes in cqlengine

2 participants