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

Sylvain Lebresne commented on CASSANDRA-2474:
---------------------------------------------

Because I just though of that, I'll note that one could do a small criticism 
about how intuitive our notation in the case of USE COMPACT STORAGE (and even 
without it in the composite case), namely that in
{noformat}
CREATE TABLE connections (
    userid uuid,
    ip binary,
    port int,
    timestamp date
    PRIMARY KEY (userid, ip, port)
) USING COMPACT STORAGE;
{noformat}
the output will be sorted for ip and port (which very likely do matter), but 
not for userid (for RandomPartitioner at least) and the notation doesn't give 
much hint of that. Typically, a notation like:
{noformat}
CREATE TABLE connections (
    userid uuid PRIMARY KEY,
    ip binary,
    port int,
    timestamp date
    SECONDARY KEY (ip, port)
) USING COMPACT STORAGE;
{noformat}
would maybe make it easier to explain that a secondary key involve a sorting 
but not a primary key (typically saying that "if you care about the sorting of 
records, you'll need to use a SECONDARY KEY" would be a fairly clear 
instruction). Of course, we could just say that in a primary key, columns after 
the first one involve a sorting, but I guess the syntax convey the idea a tad 
less.

                
> CQL support for compound columns
> --------------------------------
>
>                 Key: CASSANDRA-2474
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2474
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Eric Evans
>            Assignee: Sylvain Lebresne
>              Labels: cql
>             Fix For: 1.1
>
>         Attachments: 2474-transposed-1.PNG, 2474-transposed-raw.PNG, 
> 2474-transposed-select-no-sparse.PNG, 2474-transposed-select.PNG, 
> raw_composite.txt, screenshot-1.jpg, screenshot-2.jpg
>
>
> For the most part, this boils down to supporting the specification of 
> compound column names (the CQL syntax is colon-delimted terms), and then 
> teaching the decoders (drivers) to create structures from the results.

--
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