[
https://issues.apache.org/jira/browse/CASSANDRA-8877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577961#comment-17577961
]
Andres de la Peña edited comment on CASSANDRA-8877 at 8/10/22 12:02 PM:
------------------------------------------------------------------------
It seems I forgot to update the method
{{Selectable.WritetimeOrTTL#getExactTypeIfKnown}} to consider the new cases
where our selectors return a collection of timestamps. This was producing a
serialization error when applying a CQL function to the output of the
writetime/ttl functions, for example in {{{}SELECT MAX(WRITETIME(col)){}}},
where {{col}} is multi-cell.
I have updated that function and added a brief test, verifying that other
functions process the lists returned by {{WriteTimeOrTTLSelector}} in the same
way that they process regular list columns. A possible problem is that
currently those functions return collections as blobs, independently from this
patch. This is something that we can improve in a future ticket.
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1739]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1980/workflows/5bdcf1fd-a76a-4c7f-9221-1c5cca253749]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1980/workflows/0afb03a0-8eb2-4e2d-9cc0-e598994915f6]|
was (Author: adelapena):
It seems I forgot to update the method
{{Selectable.WritetimeOrTTL#getExactTypeIfKnown}} to consider the new cases
where our functions return a collection of timestamps. This was producing a
serialization error when applying a function to the output of the writetime/ttl
functions, for example in {{SELECT MAX(WRITETIME(col))}}, where {{col}} is
multi-cell.
I have updated that function and added a brief test, verifying that other
functions process the lists returned by {{WriteTimeOrTTLSelector}} in the same
way that they process regular list columns. A possible problem is that
currently those functions return collections as blobs, independently from this
patch. This is something that we can improve in a future ticket.
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1739]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1980/workflows/5bdcf1fd-a76a-4c7f-9221-1c5cca253749]
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1980/workflows/0afb03a0-8eb2-4e2d-9cc0-e598994915f6]|
> Ability to read the TTL and WRITE TIME of an element in a collection
> --------------------------------------------------------------------
>
> Key: CASSANDRA-8877
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8877
> Project: Cassandra
> Issue Type: Improvement
> Components: Legacy/CQL
> Reporter: Drew Kutcharian
> Assignee: Andres de la Peña
> Priority: Low
> Fix For: 4.x
>
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> Currently it's possible to set the TTL and WRITE TIME of an element in a
> collection using CQL, but there is no way to read them back.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]