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

cqlsh does not display properly the modified UDTs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.4, 3.0.0
    • None
    • Low

    Description

      The problem can be reproduced as follow:

      cqlsh:test2> create type myType (a int);
      cqlsh:test2> create table myTable (a int primary key, b frozen<myType>);
      cqlsh:test2> insert into myTable (a, b) values (1, {a: 1});
      cqlsh:test2> select * from myTable;
      
       a | b
      ---+--------
       1 | {a: 1}
      
      (1 rows)
      cqlsh:test2> alter type myType add b int;
      cqlsh:test2> insert into myTable (a, b) values (2, {a: 2, b :2});
      cqlsh:test2> select * from myTable;
      
       a | b
      ---+--------
       1 | {a: 1}
       2 | {a: 2}
      
      (2 rows)
      

      If cqlsh is then restarted it will display the data properly.

      cqlsh:test2> select * from mytable;
      
       a | b
      ---+-----------------
       1 | {a: 1, b: null}
       2 |    {a: 2, b: 2}
      
      (2 rows)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            blerer Benjamin Lerer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: