It depends on.. Latest version of Cassandra allows unfrozen UDT. The individual fields of UDT are updated atomically and they are stored effectively in distinct physical columns inside the partition, thus applying ttl() on them makes sense. I'm not sure however if the CQL parser allows this syntax
On Mon, Dec 9, 2019 at 9:13 PM Carl Mueller <carl.muel...@smartthings.com.invalid> wrote: > I could be wrong, but UDTs I think are written (and overwritten) as one > unit, so the notion of a TTL on a UDT field doesn't exist, the TTL is > applied to the overall structure. > > Think of it like a serialized json object with multiple fields. To update > a field they deserialize the json, then reserialize the json with the new > value, and the whole json object has the new timestamp or ttl. > > On Tue, Dec 3, 2019 at 10:02 AM Mark Furlong <mfurl...@ancestry.com> > wrote: > >> When I run the command ‘select ttl(udt_field) from table; I’m getting an >> error ‘InvalidRequest: Error from server: code=2200 [Invalid query] >> message="Cannot use selection function ttl on collections"’. How can I get >> the TTL from a UDT field? >> >> >> >> *Mark Furlong* >> >> >> >> >> >> We empower journeys of personal discovery to enrich lives >> >> >> >> >> >