[ 
https://issues.apache.org/jira/browse/CASSANDRA-17425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17505119#comment-17505119
 ] 

Yifan Cai commented on CASSANDRA-17425:
---------------------------------------

I do not have objections on extending 'writetime' and 'tty' functions to 
support multi-cell types, although I do doubt how practical it is to return the 
timestamps/TTLs of the entire collection. 

As said, the new function proposed is _different_ from 'writetime'. The goal is 
to allow end-user to quickly tell the latest modification time of a column, 
regardless of a single-cell or multi-cell.
Implementation-wise, I could just modify the 'WritetimeOrTTLSelector' to 
implement. But a new implementation is add instead, since I think we will be 
benefit from separating out the responsibility from the perspective of 
maintenance. 
On the other hand, Cassandra has function variants. For example, 'timeuuid' and 
its variants, ['minTimeuuid' and 'maxTimeuuid' 
|https://cassandra.apache.org/doc/trunk/cassandra/cql/cql_singlefile.html#mintimeuuid-and-maxtimeuuid].

bq. I would prefer to wait a bit for it because I have some significant changes 
coming in this area for CASSANDRA-11871.
Do you have an ETA on when your patch will land? This patch is relatively 
simple and isolated. Even if we merge it ahead, I guess it should not be a 
troublesome conflict. Maybe I was wrong? 

At the end, appreciate all discussions. 

> Add new CQL function maxWritetime
> ---------------------------------
>
>                 Key: CASSANDRA-17425
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17425
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Syntax
>            Reporter: Yifan Cai
>            Assignee: Yifan Cai
>            Priority: Normal
>
> The function "writetime" does not support multi-cell types, e.g. collections 
> and UDT. It would be useful to enable querying the latest modified timestamp 
> of a column value. 
> I'd like to propose to add a new function named "maxWritetime", which returns 
> the largest timestamp amongst the cells. When being applied to the single 
> cell types, it returns the same result as "writetime".



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to