[prev in list] [next in list] [prev in thread] [next in thread]
List: cassandra-commits
Subject: [jira] [Commented] (CASSANDRA-8147) Secondary indexing of map keys does not work properly when mixin
From: "Tyler Hobbs (JIRA)" <jira () apache ! org>
Date: 2014-10-31 21:48:34
Message-ID: JIRA.12749247.1413812849000.386433.1414792114888 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/CASSANDRA-8147?page=com.atlassian.jira.plu \
gin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14192560#comment-14192560 \
]
Tyler Hobbs commented on CASSANDRA-8147:
----------------------------------------
bq. Relation.Type and IndexExpression.Operator are really similar. Should we merge \
them?
I think that's a good idea, if you're willing to do it (perhaps as a second patch, \
for clarity).
bq. in which package do you think that we should put the resulting class?
I'm tempted to just use Relation.Type, but if you think that's a bad idea for some \
reason, I would make an o.a.c.cql3.Operator class.
> Secondary indexing of map keys does not work properly when mixing contains and \
> contains_key
> -------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-8147
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8147
> Project: Cassandra
> Issue Type: Bug
> Reporter: Benjamin Lerer
> Assignee: Benjamin Lerer
> Priority: Minor
> Fix For: 2.1.2
>
> Attachments: CASSANDRA-8147-V2.txt, CASSANDRA-8147.txt
>
>
> If you have a table with a map column and an index on the map key selecting data \
> using a contains key and a contains will not return the expected data. The problem \
> can be reproduced using the following unit test: {code}
> @Test
> public void testMapKeyContainsAndValueContains() throws Throwable
> {
> createTable("CREATE TABLE %s (account text, id int, categories map<text,text>, \
> PRIMARY KEY (account, id))"); createIndex("CREATE INDEX ON %s(keys(categories))");
> execute("INSERT INTO %s (account, id , categories) VALUES (?, ?, ?)", "test", 5, \
> map("lmn", "foo")); assertRows(execute("SELECT * FROM %s WHERE account = ? AND id = \
> ? AND categories CONTAINS KEY ? AND categories CONTAINS ? ALLOW FILTERING", "test", \
> 5, "lmn", "foo"), row("test", 5, map("lmn", "foo"))); }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic