cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CASSANDRA-2474) CQL support for compound columns
Date Mon, 19 Dec 2011 21:03:33 GMT

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

Jonathan Ellis edited comment on CASSANDRA-2474 at 12/19/11 9:02 PM:
---------------------------------------------------------------------

The crucial part of this latest proposal is that it really highlights that transposition really
is just an implementation detail from the relational perspective.  So, to flesh that out:

{code}
INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1818', 'jadams', 'Revolution was effected before the war commenced');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1763', 'jadams', 'Democracy will soon degenerate into an anarchy');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1790', 'gwashington', 'To be prepared for war is one of the most effectual
means of preserving peace');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('bfranklin', '1781', 'tjefferson', 'Every government degenerates when trusted to the
rulers of the people alone');
{code}

... corresponding to the data in !2474-transposed-1.PNG!

which in "raw" form looks like !2474-transposed-raw.PNG!

Does that make sense?  We're using TRANSPOSED AS similarly to how databases have used storage
hints like CLUSTERED.  It doesn't affect the relational model of the data, but it gives you
different performance characteristics.  (The analogy is particularly apt in that both CLUSTERED
and TRANSPOSED AS affect ordering of results. EDIT: oops, goofed in ordering of the tjefferson
row in my diagram.)
                
      was (Author: jbellis):
    The crucial part of this latest proposal is that it really highlights that transposition
really is just an implementation detail from the relational perspective.  So, to flesh that
out:

{code}
INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1818', 'jadams', 'Revolution was effected before the war commenced');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1763', 'jadams', 'Democracy will soon degenerate into an anarchy');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('tjefferson', '1790', 'gwashington', 'To be prepared for war is one of the most effectual
means of preserving peace');

INSERT INTO timeline (user_id, posted_at, posted_by, body)
VALUES ('bfranklin', '1781', 'tjefferson', 'Every government degenerates when trusted to the
rulers of the people alone');
{code}

... corresponding to the data in !2474-transposed-1.PNG!

which in "raw" form looks like !2474-transposed-raw.PNG!

Does that make sense?  We're using TRANSPOSED AS similarly to how databases have used storage
hints like CLUSTERED.  It doesn't affect the relational model of the data, but it gives you
different performance characteristics.  (The analogy is particularly apt in that both CLUSTERED
and TRANSPOSED AS affect ordering of results.)
                  
> 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: Pavel Yaskevich
>              Labels: cql
>             Fix For: 1.1
>
>         Attachments: 2474-transposed-1.PNG, 2474-transposed-raw.PNG, 2474-transposed-select.PNG,
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

        

Mime
View raw message