Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-8155

confusing error when erroneously querying map secondary index

    XMLWordPrintableJSON

    Details

    • Severity:
      Low

      Description

      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:

      cqlsh:test> CREATE TABLE test.foo (
              ...     id1 text,
              ...     id2 text,
              ...     categories map<text, text>,
              ...     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'});
      

      Now try to query the existing values index by key:

      cqlsh:test> select * from foo where categories contains key 'firstkey';
      list index out of range
      

        Attachments

        1. 8155.txt
          11 kB
          Tom Hobbs

          Issue Links

            Activity

              People

              • Assignee:
                thobbs Tom Hobbs
                Reporter:
                rhatch Russ Hatch
                Authors:
                Tom Hobbs
                Reviewers:
                Sylvain Lebresne
                Tester:
                Russ Hatch
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: