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

Benjamin Lerer commented on CASSANDRA-17425:
--------------------------------------------

{quote}
It is different from CASSANDRA-8877, which is to retrieve the timestamp of one 
cell from a multi-cell type and end-user cannot tell if the retrieved timestamp 
is the latest.
{quote}

There were 2 parts to CASSANDRA-8877 as [~slebresne] pointed out. One was about 
allowing to select an element of the collection which has been implemented as 
part of CASSANDRA-7396 (not for list through). The other part was about what we 
should return when we use {{writetime}} or {{ttl}} on a multi-cell collection. 
Should we return a list of timestamps/ttls? In my opinion that is probably what 
we should do (I believe that [~adelapena] has a patch for that. It might need 
to be reworked a bit.)
Adding a {{maxtimestamp}} and a {{minttl}} function will probably  be much 
easier at that point as it should be possible to implement it by only modifying 
 {{WritetimeOrTTLSelector}}.

{quote}I can see the concerns when I was working on the patch. It feels like 
the selector framework needs some refactor, which I did not do in this 
patch.{quote}

I woud prefer to wait a bit for it because I have some significant changes 
coming in this area for CASSANDRA-11871.

Nevertheless, if you have some ideas I am really interested to hear them. 


  

> 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