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

Jonathan Ellis commented on CASSANDRA-4004:
-------------------------------------------

bq. The idea of my patch is that adding DESC to a field in a table declaration 
changes the order of records logically 

That makes sense for the old world of ReversedType and {{reversed}} slice flag, 
but I don't think it makes sense for CQL. When I ask for "ORDER BY X DESC" I 
expect the largest X first, period. So a table declaration like this makes 
sense as an optimization if DESC is your most frequent query type, but it 
shouldn't change the semantics of the query itself.
                
> 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
>
>
> 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

        

Reply via email to