You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Marco Palladino (JIRA)" <ji...@apache.org> on 2015/03/25 08:53:53 UTC

[jira] [Commented] (CASSANDRA-8425) Add full entry indexing capability for maps

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

Marco Palladino commented on CASSANDRA-8425:
--------------------------------------------

This would be a very useful feature. This suggested syntax looks very concise:

{code:sql}
SELECT * FROM table WHERE map CONTAINS ENTRY { 'country': 'usa' };
{code}

> Add full entry indexing capability for maps
> -------------------------------------------
>
>                 Key: CASSANDRA-8425
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8425
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Lex Lythius
>            Priority: Minor
>
> Since C* 2.1 we're able to index map keys or map values and query them using {{CONTAINS KEY}} and {{CONTAINS}} respectively.
> However, some use cases require being able to filter for specific key/value combination. Syntax might be something along the lines of 
> {code:sql}
> SELECT * FROM table WHERE map['country'] = 'usa';
> {code}
> or
> {code:sql}
> SELECT * FROM table WHERE map CONTAINS ENTRY { 'country': 'usa' };
> {code}
> Of course, right now we can have the client refine the results from
> {code:sql}
> SELECT * FROM table WHERE map CONTAINS { 'usa' };
> {code}
> or
> {code:sql}
> SELECT * FROM table WHERE map CONTAINS KEY { 'country' };
> {code}
> but I believe this would add a good deal of flexibility.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)