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

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.1 rc1
    • Component/s: Legacy/CQL
    • Labels:

      Description

      For CASSANDRA-6875 we need to be able to talk about tuples values and types (for prepared variables). Since we need it there, clients will need to support them anyway and so I think it would be a lot cleaner to start supporting those more generally. Besides, having tuples is a relatively simple and natural extension to what we have. I'll note in particular that tuple have a close relationship to user type in the sense that a tuple will be really just like an anonymous with no name for the fields and in particular a tuple value will be the same than a user type value.

      The syntax would simply look like that:

      CREATE TABLE foo (
          k int PRIMARY KEY,
          v tuple<int, text, float>
      )
      
      INSERT INTO foo(k, v) VALUES(0, (3, 'bar', 2.1));
      

      We can also add projections in selects if we want:

      SELECT v[0], v[2] FROM foo WHERE k = 0;
      

      but that can come later (after all, we still don't have projections for collections and it's not a big deal).

        Attachments

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne Assign to me
              Reporter:
              slebresne Sylvain Lebresne
              Authors:
              Sylvain Lebresne
              Reviewers:
              Tom Hobbs

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment