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

Vectors of counter as subtype do not work as expected

    XMLWordPrintableJSON

Details

    • Correctness
    • Normal
    • Normal
    • User Report
    • All
    • None

    Description

      Here is the current behavior:

      cqlsh:default> create table counter_table ( i int PRIMARY KEY, j vector<counter,2> );
      
      cqlsh:default> insert into counter_table (i, j) values (0, [0,0]);
      cqlsh:default> select * from counter_table;
      
       i | j
      ---+----------------------------------------
       0 | [576460752303423488, 2251799813685248]
      
      (1 rows) 

       We may want vectors to handle `counter` subtype as other collections do, which is throwing an error:

      cqlsh:cycling>  create table upcoming_calendar ( year int, month int, events list<counter>, primary key (year, month));
      InvalidRequest: Error from server: code=2200 [Invalid query] message="Counters are not allowed inside collections: list<counter>"
      
      
      cqlsh:cycling>  create table upcoming_calendar ( year int, month int, events map<int, counter>, primary key (year, month));
      InvalidRequest: Error from server: code=2200 [Invalid query] message="Counters are not allowed inside collections: map<int, counter>" 

      Attachments

        Activity

          People

            Unassigned Unassigned
            janesiyaohe Jane He
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: