Custom Behavior Type (UDT) in Kassandra

if anyone has experience using UDT (User Defined Types), I would like to understand how backward compatibility will work.

Say I have the following UDT

CREATE TYPE addr ( street1 text, zip text, state text ); 

If I modify the UDT "addr" to have a few more attributes (for example, zip_code2 int and name text):

 CREATE TYPE addr ( street1 text, zip text, state text, zip_code2 int, name text ); 

How do older strings that have these attributes work? Is it even compatible?

thanks

0
source share
1 answer

The new UDT definition will be compatible with the old definition. Custom types can have null values ​​for fields, so if you change the type definition, all existing values ​​for this type will just have null values ​​for the added fields.

+3
source

Source: https://habr.com/ru/post/1238304/


All Articles