[
https://issues.apache.org/jira/browse/CASSANDRA-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097166#comment-13097166
]
Pavel Yaskevich commented on CASSANDRA-2474:
--------------------------------------------
if we consider that timestamp is key and event_id, category and subcategory is
composite name then:
bq. Give me all the events for time t, category c and sub-category sc
{noformat}
SELECT name AS (event_id, category, subcategory), value AS event FROM events
WHERE key = <timestamp> AND category = <name> AND subcategory = <name>;
{noformat}
bq. Give me all the events for time t and category c
{noformat}
SELECT name AS (event_id, category, *), value AS event FROM events WHERE key =
<timestamp> AND category = <name>;
{noformat}
bq. Give me all the events for time t and category c1 to c2 (where c1 < c2 for
the category sorting)
{noformat}
SELECT name AS (event_id, category, *), value AS event FROM events WHERE key =
<timestamp> AND category > c1 AND category < c2;
{noformat}
bq. Give me everything for the last 4 hours
{noformat}
SELECT name AS (event_id, category, *), value AS event FROM events WHERE key >
<timestamp> AND key < <timestamp>;
{noformat}
> CQL support for compound columns
> --------------------------------
>
> Key: CASSANDRA-2474
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2474
> Project: Cassandra
> Issue Type: Sub-task
> Components: API, Core
> Reporter: Eric Evans
> Assignee: Pavel Yaskevich
> Labels: cql
> Fix For: 1.0
>
> Attachments: 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira