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

Andres de la Peña commented on CASSANDRA-15814:
-----------------------------------------------

It seems that some parts of the parsing of {{Sets}}, {{Lists}} and {{Maps}} 
literals are not taking into account that the type can be wrapped into a 
reversed type. The attached patch simply makes sure to unwrap any possible 
reversed collection type.

CI results:
||PR||utest||dtest||CircleCI j8||CircleCI j11||
|[2.2|https://github.com/apache/cassandra/pull/655]  
|[149|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-test/149/]|[190|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-dtest/190/]|[link|https://app.circleci.com/pipelines/github/adelapena/cassandra/57/workflows/01ede702-aa0f-4ea3-876d-a2bafc4d748b/]|-|
|[3.0|https://github.com/apache/cassandra/pull/656]  
|[150|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-test/150/]|[191|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-dtest/191/]|[link|https://app.circleci.com/pipelines/github/adelapena/cassandra/60/workflows/47613064-8889-4cef-9101-35b7b771c94f/]|-|
|[3.11|https://github.com/apache/cassandra/pull/657] 
|[151|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-test/151/]|[192|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-dtest/192/]|[link|https://app.circleci.com/pipelines/github/adelapena/cassandra/58/workflows/0a01db90-f6ad-40b8-a9bf-af3a5e65fd0a/]|-|
|[trunk|https://github.com/apache/cassandra/pull/658]|[152|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-test/152/]|[193|https://ci-cassandra.apache.org/view/all/job/Cassandra-devbranch-dtest/193/]|[link|https://app.circleci.com/pipelines/github/adelapena/cassandra/59/workflows/f8e9db8c-1da5-4e01-9798-cae982cbcc7a/]|[link|https://app.circleci.com/pipelines/github/adelapena/cassandra/59/workflows/33b79196-8dda-42ce-a95d-07a219444753]|



> order by descending on frozen list not working
> ----------------------------------------------
>
>                 Key: CASSANDRA-15814
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15814
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter
>            Reporter: Felipe Perez
>            Assignee: Andres de la Peña
>            Priority: Normal
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> By creating a table like the following:
> {code:java}
> CREATE TABLE IF NOT EXISTS software (
>  name ascii,
>  version frozen<list<int>>,
>  data ascii,
>  PRIMARY KEY(name,version)
> )
> {code}
> It works and version is ordered in an ascending order. But when trying to 
> order in descending order:
> {code:java}
> CREATE TABLE IF NOT EXISTS software (
>     name ascii,
>     version frozen<list<int>>,
>     data ascii,
>     PRIMARY KEY(name,version)
> ) WITH CLUSTERING ORDER BY (version DESC);
> {code}
> The table is created normally, but when trying to insert a row:
> {code:java}
> insert into software(name, version) values ('t1', [2,10,30,40,50]); 
> {code}
> Cassandra throws an error:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid 
> list literal for version of type frozen<list<int>>"
> {code}
> The goal here is that I would like to get the last version of a software.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to