Details
-
New Feature
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
Semantic
-
Low Hanging Fruit
Description
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 preventing 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.