[ 
https://issues.apache.org/jira/browse/CASSANDRA-9312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-9312:
--------------------------------------
    Labels: ghc-lhf lhf  (was: AdventCalendar2021 lhf)

> Provide a way to retrieve the write time of a CQL row
> -----------------------------------------------------
>
>                 Key: CASSANDRA-9312
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9312
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Legacy/CQL
>            Reporter: Nicolas Favre-Felix
>            Priority: Normal
>              Labels: ghc-lhf, lhf
>             Fix For: 4.x
>
>
> There is currently no way to retrieve the "writetime" of a CQL row. This is 
> an issue for tables in which all dimensions are part of the primary key.
> Since Cassandra already stores a cell for the CQL row, it would make sense to 
> provide a way to read its timestamp. This feature would be consistent with 
> the concept of a row as an entity containing a number of optional columns, 
> but able to exist on its own.
> +Additional information for newcomers+
> As [~slebresne] suggested in the comments, this functionality can be done by 
> allowing the {{writeTime}} and {{ttl}} methods on primary key columns. To do 
> that you will need to:
> * remove the check of {{Selectable.WritetimeOrTTL}} preenting the use of 
> {{writeTime}} and {{ttl}} methods on primary key columns
> * add a new method like {{add(ByteBuffer v, LivenessInfo livenessInfo, int 
> nowInSec)}} to {{ResultSetBuilder}} that method should populate the value as 
> well as the timestamps and ttls if needed
> * In {{SelectStatement.processPartition}} retrieve the row 
> primaryKeyLivenessInfo and call the new {{ResultSetBuilder}} method with 
> those information.
> * Adds some unit tests in {{SelectTest}}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to