Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D1D0617F01 for ; Tue, 21 Oct 2014 22:32:34 +0000 (UTC) Received: (qmail 36482 invoked by uid 500); 21 Oct 2014 22:32:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 36352 invoked by uid 500); 21 Oct 2014 22:32:34 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 36066 invoked by uid 99); 21 Oct 2014 22:32:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2014 22:32:34 +0000 Date: Tue, 21 Oct 2014 22:32:34 +0000 (UTC) From: "Tyler Hobbs (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8155) confusing error when erroneously querying map secondary index MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-8155: ----------------------------------- Attachment: 8155.txt 8155.txt fixes the cqlsh grammar and pulls out some of the improved secondary index validation from the patch on CASSANDRA-7859. > confusing error when erroneously querying map secondary index > ------------------------------------------------------------- > > Key: CASSANDRA-8155 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8155 > Project: Cassandra > Issue Type: Bug > Reporter: Russ Hatch > Assignee: Tyler Hobbs > Priority: Minor > Labels: cqlsh, lhf > Attachments: 8155.txt > > > With a secondary index on values, attempting to query by key returns an error message of "list index out of range". > This is kinda a similar issue to CASSANDRA-8147 (but that scenario results in no error when there probably should be one). > To repro: > {noformat} > cqlsh:test> CREATE TABLE test.foo ( > ... id1 text, > ... id2 text, > ... categories map, > ... PRIMARY KEY (id1, id2)); > cqlsh:test> CREATE INDEX foo_categories_idx ON test.foo (categories); > cqlsh:test> insert into foo (id1, id2, categories) values ('foo', 'bar', {'firstkey':'one', 'secondkey':'two'}); > {noformat} > Now try to query the existing values index by key: > {noformat} > cqlsh:test> select * from foo where categories contains key 'firstkey'; > list index out of range > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)