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

Dropping a table doesn't drop its dropped columns

    XMLWordPrintableJSON

Details

    • Low

    Description

      I'm not sure if this is intended or not, but currently a table's dropped columns are not dropped when the table itself is dropped:

      cqlsh> create keyspace ks WITH replication={ 'class' : 'SimpleStrategy', 'replication_factor' : 1 } ;
      cqlsh> use ks;
      cqlsh:ks> create table  test (pk text primary key, c1 int);
      cqlsh:ks> alter table test drop c1;
      cqlsh:ks> drop table test;
      cqlsh:ks> select * from system_schema.dropped_columns where keyspace_name = 'ks' and table_name = 'test';
      
       keyspace_name | table_name | column_name | dropped_time                    | kind    | type
      ---------------+------------+-------------+---------------------------------+---------+------
                  ks |       test |          c1 | 2017-07-25 17:53:47.651000+0000 | regular |  int
      
      (1 rows)
      

      This can have surprising consequences when creating another table with the same name.

      Attachments

        Activity

          People

            jasonstack Zhao Yang
            duarten Duarte Nunes
            Zhao Yang
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: