mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-01 05:35:48 +00:00
For a column of type `frozen<list<T>>` in base table, a corresponding column of type `frozen<map<timeuuid, T>>` is created in cdc log. Although a similar change of type takes place in case of non-frozen lists, this is unneeded in case of frozen lists - frozen collections are atomic, therefore there is no need for complicated type that will be able to represent a column update that depends on its previous value (e.g. appending elements to the end of the list). Moreover, only cdc log table creation logic performs this type change for frozen lists. The logic of `transformer::transform`, which is responsible for creation of mutations to cdc log, assumes that atomic columns will have their types unchanged in cdc log table. It simply copies new value of the column from original mutation to the cdc log mutation. A serialized frozen list might be copied to a field that is of frozen map type, which may cause the field to become impossible to deserialize. This patch causes frozen list base table columns to have a corresponding column in cdc log with the same type. A test is added which asserts that the type of cdc log columns is not changed in the case of frozen base columns. Tests: unit(dev) Fixes #6172