[
https://issues.apache.org/jira/browse/CASSANDRA-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095653#comment-13095653
]
Pavel Yaskevich edited comment on CASSANDRA-2474 at 9/1/11 10:47 PM:
---------------------------------------------------------------------
we can extend that syntax like this to support multiple columns:
for composite columns:
{noformat}
SELECT :column as (date, company), :value as price FROM stockhist WHERE
<key_alias>='GOOG' AND date >= '2011-01-02' LIMIT 50
{noformat}
for super columns:
{noformat}
SELECT :parent as company, :column as (date, <attr>), :value as (price,
<attr_value>) FROM stockhist WHERE company='GOOG' AND date >= '2011-01-02' AND
<key_alias> = '...' LIMIT 50
{noformat}
Also instead of :column we could use just :name, it might be even cleaner.
was (Author: xedin):
we can extend that syntax like this to support multiple columns:
{noformat}
SELECT :column as (date, company), :value as (price, name) FROM stockhist WHERE
<key_alias>='GOOG' AND date >= '2011-01-02' LIMIT 50
{noformat}
{noformat}
SELECT :parent as company, :column as (date, <attr>), :value as (price,
<attr_value>) FROM stockhist WHERE company='GOOG' AND date >= '2011-01-02' AND
<key_alias> = '...' LIMIT 50
{noformat}
Also instead of :column we could use just :name, it might be even cleaner.
> 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