When create table model using annotations Spring data cassandra supports by default only basic column types like String, Date, UUID.
In many use cases developers decides to store json, xml files in one cassandra text column.
For such purposes in Cassandra 3.0 driver guys from Datastax introduced Custom codecs feature, see : Cassandra 3.0 driver release
It would be a nice feature to be able to declare custom column type using some annotation like @CompoundType and register a set of mapping described how to serialize it and deserialize particular object type to/from cassandra text column.
It could work similar to Spring property custom converter : Spring Conversion service
with the upgrade to Cassandra 3.0 we're investigating whether we can expose additional functionality by using CodecRegistry. This is useful for TupleValue and UDT types. Cassandra provides since 2.2 JSON support for retrieving/inserting data which gives some flexibility to represent incoming/outgoing data as JSON. Aren't UDT's the right choice to represent structured data within one field?
You are right, UDT is a greate feature and I can use it as the data that I need to store are all json's. I will like it if you implement it in Spring Data Cassandra.
I was thinking about implementing something which gives more flexibility than UDT like CodecRegistry.
I see following advantages of CodecRegistry:
I can imagine that if you implement UDT then each UDT will need to have some annotations inside. In such scenario UDT won't work for some 3rd party libraries, even for java and time api types (for now people are using ConversionServiceFactoryBean but its not a friendly way to configure mapping).
UDT support json only so if someone is using some other types like xml, he would needs to write converter per each type.
Summarizing UDT is great and would handle most of the cases, but adding support for CodecRegistry could be a nice feature too.
I would be happy if Spring data cassandra will support at least one of these fetaure.