[ 
https://issues.apache.org/jira/browse/CASSANDRA-17628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556820#comment-17556820
 ] 

Andres de la Peña edited comment on CASSANDRA-17628 at 6/21/22 11:04 AM:
-------------------------------------------------------------------------

{quote}Triaging the 4.1 blockers, is this one a beta blocker? It seems from the 
list of versions it is not a regression? Shall we remove the 4.1-beta from the 
list until it is committed?
{quote}
Correct, it's not a regression but a bug that has always been there. Removing 
4.1-beta for now.
{quote}Sthg happened to the 3.0 PR right? I see unrelated commits?
{quote}
Right, it should have happened during rebase. I have fixed it, 
[here|https://app.circleci.com/pipelines/github/adelapena/cassandra/1719/workflows/22cf683e-2c18-4c89-9f50-f492f6e459ed]
 is CI again.


was (Author: adelapena):
{quote}Triaging the 4.1 blockers, is this one a beta blocker? It seems from the 
list of versions it is not a regression? Shall we remove the 4.1-beta from the 
list until it is committed? {quote}
Correct, it's not a regression but a bug that has always been there. Removing 
4.1-beta for now.
{quote}Sthg happened to the 3.0 PR right? I see unrelated commits?{quote}
Right, it should have been happened with rebase. I have fixed it, 
[here|https://app.circleci.com/pipelines/github/adelapena/cassandra/1719/workflows/22cf683e-2c18-4c89-9f50-f492f6e459ed]
 is CI again.

> CQL writetime and ttl functions should be forbidden for multicell columns
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17628
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17628
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Semantics
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> CQL {{writetime}} and {{ttl}} functions are currently forbidden for 
> collections, frozen or not. Also, they are always allowed for UDTs, frozen or 
> not:
> {code}
> CREATE TYPE udt (a int, b int);
> CREATE TABLE t (k int PRIMARY KEY, s set<int>, fs frozen<set<int>>, t udt, ft 
> frozen<udt>);
> SELECT writetime(s) FROM t; -- fails
> SELECT writetime(st) FROM t; -- fails
> SELECT writetime(t) FROM t; -- allowed
> SELECT writetime(ft) FROM t; -- allowed
> {code}
> This is done by checking in 
> [{{Selectable.WritetimeOrTTL#newSelectorFactory}}|https://github.com/apache/cassandra/blob/cassandra-4.0.4/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L250]
>  whether the column is a collection or not. However, I think that what we 
> should check is whether the column is multi-cell. That way the function would 
> work with frozen collections and UDTs, and it would reject unfrozen 
> collections and UDTs:
> {code}
> SELECT writetime(s) FROM t; -- fails
> SELECT writetime(st) FROM t; -- allowed
> SELECT writetime(t) FROM t; -- fails
> SELECT writetime(ft) FROM t; -- allowed
> {code} 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to