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

Select an element inside a UDT throws an index error

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Severity:
      Normal
    • Since Version:

      Description

      Create the following data model:

      CREATE TYPE address (
      street text,
      city text,
      zip_code int,
      phones set<text>
       );
       
      CREATE TYPE fullname (
      firstname text,
      lastname text
      );
      
      CREATE TABLE users (
      id uuid PRIMARY KEY,
      name FROZEN <fullname>,
      addresses map<text, FROZEN <address>>
      );
      
      INSERT INTO users (id, name) 
      VALUES (62c36092-82a1-3a00-93d1-46196ee77204, {firstname: 'Marie-Claude', lastname: 'Josset'});
      

      When trying to select a sub-field in the name type:

      SELECT name.lastname FROM users WHERE id=62c36092-82a1-3a00-93d1-46196ee77204;
      

      You get the following error:

      list index out of range
      

        Attachments

        1. 7891-3.txt
          0.6 kB
          Philip Thompson
        2. 7891-2.txt
          0.7 kB
          Philip Thompson
        3. 7891.txt
          0.7 kB
          Philip Thompson

        Issue Links

          Activity

            People

            • Assignee:
              philipthompson Philip Thompson Assign to me
              Reporter:
              pmcfadin Patrick McFadin
              Authors:
              Philip Thompson
              Reviewers:
              Tom Hobbs
              Tester:
              Philip Thompson

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment