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

user types allow counters

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 rc5
    • None
    • Normal

    Description

      From the conversation on CASSANDRA-6312 it seems we should not allow user types to contain counters. Presently, user types can be defined with field types of counter, and these user types can also be associated with tables without error.

      I'm not certain if there's a compelling case for counters within user types, but I don't think there's any syntax existing presently that would allow updating them anyway.

      To repro:

      CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;
      
      USE test;
      
      CREATE TYPE t_item (
        sub_one counter
      ); 
      
      CREATE TYPE item (
        sub_one counter
      ); 
      
      CREATE TABLE test.mytable (
          value1 text PRIMARY KEY,
          item t_item,
          value2 text
      );
      
      cqlsh:test> insert into mytable (value1, value2) VALUES ( 'foo', 'bar');
      cqlsh:test> select * from mytable;
      
       value1 | item | value2
      --------+------+--------
          foo | null |    bar
      
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aleksey Aleksey Yeschenko Assign to me
            rhatch Russ Hatch
            Aleksey Yeschenko
            Jonathan Ellis
            Russ Hatch Russ Hatch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment