[
https://issues.apache.org/jira/browse/CASSANDRA-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173294#comment-13173294
]
T Jake Luciani commented on CASSANDRA-2474:
-------------------------------------------
One possibility that could avoid SPARSE/DENSE syntax would be:
{code:sql}
--DENSE transposed format
--column names are used directly in comparator
CREATE TABLE msg (
user text primary key,
sender text,
thread text,
tid int,
body text
)
WITH comparator = composite(sender,thread,tid);
{code}
{code:sql}
--SPARSE transposed format
--composite comparator with no specified columns will be a dynamic comparator
--and includes the column name as part of the dynamic column name
CREATE TABLE msg (
user text primary key,
sender text,
thread text,
tid int,
body text
)
WITH comparator = composite;
{code}
{code:sql}
--Finally in the case of both SPARSE/DENSE
CREATE TABLE timeline (
userid int primary key,
posted_at uuid,
column string,
value blob
)
WITH comparator = composite(posted_at,*);
{code}
> 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-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