Nadav Har'El created CASSANDRA-21240:
----------------------------------------
Summary: writetime(map) should fail, but returns an unusable list
Key: CASSANDRA-21240
URL: https://issues.apache.org/jira/browse/CASSANDRA-21240
Project: Apache Cassandra
Issue Type: Bug
Reporter: Nadav Har'El
Commit
[https://github.com/apache/cassandra/commit/26dd119679605bf61ad3caa24a70509e5be5aac9]
introduced a new function maxWriteTime(m) that can be used on a collection. It
explains that "unlike writetime, maxwritetime can be applied to multi-cell data
types, e.g. non-frozen collections and UDT". This suggests that writetime()
*cannot* be used on a collection. And it makes sense - a collection does not
have a single writetime() to return.
But I ran now a small test on Cassandra 5.0.6, and when I create a *map* with
two elements, it turns out that I can select writetime(m), and it works but
returns... An array! For example, [1773935202456154, 1773935202456154] - with
the timestamps of the two elements.
But how is it helpful to get a list of timestamps, without knowing which
timestamp belongs to which element in the map?
I couldn't find any documentation suggesting why or when it became legal to
read the timestamp() of a map column, was it does deliberately or by mistake?
If it was done deliberately, shouldn't it return a map - not a list - of
timestamps?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]