[
https://issues.apache.org/jira/browse/CASSANDRA-4004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266497#comment-13266497
]
Sylvain Lebresne commented on CASSANDRA-4004:
---------------------------------------------
Which hashmap are you talking about? If it's {{stmt.parameters.orderings}}, the
actual order of elements in the map is not used by the code so that shouldn't
matter. I'll note there is a test for this patch at
https://github.com/riptano/cassandra-dtest/blob/master/cql_tests.py (the line
{{require('#4004')}} needs to be commented to actually run the test) showing
that ORDER BY X DESC, Y ASC is the reverse of ORDER BY Y ASC, X DESC.
As a side note, I've convinced myself that 4004_alternative.txt is maybe a bit
more natural than creating a new, reversed type so I'm good with that.
> Add support for ReversedType
> ----------------------------
>
> Key: CASSANDRA-4004
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4004
> Project: Cassandra
> Issue Type: Sub-task
> Components: API
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.1.1
>
> Attachments: 4004.txt, 4004_alternative.txt
>
>
> It would be nice to add a native syntax for the use of ReversedType. I'm sure
> there is anything in SQL that we inspired ourselves from, so I would propose
> something like:
> {noformat}
> CREATE TABLE timeseries (
> key text,
> time uuid,
> value text,
> PRIMARY KEY (key, time DESC)
> )
> {noformat}
> Alternatively, the DESC could also be put after the column name definition
> but one argument for putting it in the PK instead is that this only apply to
> keys.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira