[
https://issues.apache.org/jira/browse/CASSANDRA-17425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508787#comment-17508787
]
Andres de la Peña commented on CASSANDRA-17425:
-----------------------------------------------
Agree, that patch was able to do things like:
{code:java}
CREATE TABLE IF NOT EXISTS t (k int PRIMARY KEY, s set<int>);
INSERT INTO t (k, s) VALUES (1, {1, 2}) USING TIMESTAMP 100 AND TTL 10000;
UPDATE t USING TIMESTAMP 200 AND TTL 20000 SET s += {3} WHERE k=1;
SELECT s[2..], WRITETIME(s[2..]), TTL(s[2..]) FROM t;
s[2..] | writetime(s[2..]) | ttl(s[2..])
--------+-------------------+----------------
{2, 3} | [100, 200] | [10000, 20000]
{code}
I also think that doing MaxWritetime on top of CASSANDRA-8877 would be the
easier and most flexible approach.
> 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]