Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

1/16/2020

Reading time:1 min

Cassandra frozen keyword meaning

by John Doe



What's the meaning of the frozen keyword in Cassandra?I'm trying to read this documentation page: Using a user-defined type, but their explanation for the frozen keyword (which they use in their examples) is not clear enough for me: To support future capabilities, a column definition of a user-defined or tuple type requires the frozen keyword. Cassandra serializes a frozen value having multiple components into a single value. For examples and usage information, see "Using a user-defined type", "Tuple type", and Collection type.I haven't found any other definition or a clear explanation for that in the net.
 edited Sep 22 '17 at 18:01

 Community♦
 
 111 silver badge
 

 asked Mar 1 '17 at 13:12

 AlonAlon
 
 3,30466 gold badges4343 silver badges8181 bronze badges
 

 1 Answer
 1

 In Cassandra if you define UDT or Collection as frozen, you can't update UDT's or collection's individual item, you have to reinsert with full value. A frozen value serializes multiple components into a single value. Non-frozen types allow updates to individual fields. Cassandra treats the value of a frozen type as a blob. The entire value must be overwritten.Source : https://docs.datastax.com/en/cql/3.1/cql/cql_reference/collection_type_r.html@Alon : "Long story short: frozen = immutable"
 edited Feb 8 '18 at 19:20

 
 

 answered Mar 1 '17 at 14:13

 Ashraful IslamAshraful Islam
 
 9,65522 gold badges2424 silver badges4141 bronze badges
 

Illustration Image

What's the meaning of the frozen keyword in Cassandra?

I'm trying to read this documentation page: Using a user-defined type, but their explanation for the frozen keyword (which they use in their examples) is not clear enough for me:

To support future capabilities, a column definition of a user-defined or tuple type requires the frozen keyword. Cassandra serializes a frozen value having multiple components into a single value. For examples and usage information, see "Using a user-defined type", "Tuple type", and Collection type.

I haven't found any other definition or a clear explanation for that in the net.

Community
111 silver badge
asked Mar 1 '17 at 13:12

1 Answer 1

In Cassandra if you define UDT or Collection as frozen, you can't update UDT's or collection's individual item, you have to reinsert with full value.

A frozen value serializes multiple components into a single value. Non-frozen types allow updates to individual fields. Cassandra treats the value of a frozen type as a blob. The entire value must be overwritten.

Source : https://docs.datastax.com/en/cql/3.1/cql/cql_reference/collection_type_r.html

@Alon : "Long story short: frozen = immutable"

answered Mar 1 '17 at 14:13

Related Articles

data.modeling
cassandra

Search key of big partition in cassandra

John Doe

2/17/2023

data.modeling
cassandra
spark

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

data.modeling