cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6383) Secondary indexing of map keys
Date Fri, 20 Dec 2013 14:06:10 GMT

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

Sylvain Lebresne commented on CASSANDRA-6383:
---------------------------------------------

Btw, forgot to mention that since for a map we don't allow indexing both the key and value,
there is the question of what to do with a "CREATE INDEX IF EXISTS" if there is an existing
index on values and the new create attempts to create an index on keys. The current patch
reject the query, because that feels the most reasonable thing to do, but that does mean that
even with IF EXISTS a create index can fail, which might be annoying I suppose (not a big
deal really, just wanted to mention it).

> Secondary indexing of map keys
> ------------------------------
>
>                 Key: CASSANDRA-6383
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6383
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 2.1
>
>         Attachments: 6383.txt
>
>
> CASSANDRA-4511 started adding secondary indexing for collections, but didn't wired map
key indexing because this requires generalizing a bit the 2ndary index API to support 2 indexes
on the same column. And since that's not entirely related to the initial problem of CASSANDRA-4511,
let's tackle this last part here.
> I'll note that one other is the syntax. For selection, I propose
> {noformat}
> SELECT * FROM foo WHERE myMap CONTAINS KEY 'bar';
> {noformat}
> (but that assumes we use CONTAINS in CASSANDRA-4511, if we use IN, we'll need something
else)
> For declaring indexes I'm less inspired. We could have something like
> {noformat}
> CREATE INDEX ON foo(myMap KEYS)
> {noformat}
> but maybe someone has a better idea?



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message