cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CASSANDRA-2474) CQL support for compound columns
Date Wed, 07 Sep 2011 17:11:10 GMT

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

Pavel Yaskevich edited comment on CASSANDRA-2474 at 9/7/11 5:09 PM:
--------------------------------------------------------------------

To make it Hive friendly

{noformat}
-- sparse select example
SELECT tweet_id; username, body; location FROM tweets:transposed WHERE key = <key> AND
username = 'xedin';

-- dense select example
SELECT tweet_id; username; location FROM tweets:transposed WHERE key = <key> AND username
= 'xedin';

-- insert
INSERT INTO tweets (KEY, COMPOUND_NAME('2e1c3308', username))  VALUES (<key>, 'cscotta');
INSERT INTO tweets (KEY, COMPOUND_NAME('2e1c3308', body))      VALUES (<key>, 'Brother...');
INSERT INTO tweets (KEY, COMPOUND_NAME('2e1c3308', 'cscotta')) VALUES (<key>, 'Brother...');

-- update
UPDATE tweets SET value = 'My motocycle...' WHERE KEY = <key> AND COMPOUND_NAME('2e1c3308',
'cscotta');
{noformat}

      was (Author: xedin):
    To make it Hive friendly

{noformat}
-- sparse select example
SELECT tweet_id; username, body; location FROM tweets:transposed WHERE key = <key> AND
username = 'xedin';

-- dense select example
SELECT tweet_id; username; location FROM tweets:transposed WHERE key = <key> AND username
= 'xedin';

-- insert
INSERT INTO tweets:transposed (KEY, COMPOUND_NAME('2e1c3308', username))  VALUES (<key>,
'cscotta');
INSERT INTO tweets:transposed (KEY, COMPOUND_NAME('2e1c3308', body))      VALUES (<key>,
'Brother...');
INSERT INTO tweets:transposed (KEY, COMPOUND_NAME('2e1c3308', 'cscotta')) VALUES (<key>,
'Brother...');

-- update
UPDATE tweets:transposed SET value = 'My motocycle...' WHERE KEY = <key> AND COMPOUND_NAME('2e1c3308',
'cscotta');
{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

        

Mime
View raw message