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

column expire to null can still be retrieved using not null value in where clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Cannot Reproduce
    • None
    • Legacy/CQL
    • None
    • cql 5.0.1
      cassandra 2.1.5

    • Normal

    Description

      1. first create table:
      create table device_share(
      device_id text primary key,
      share_status text,
      share_expire boolean
      );
      CREATE INDEX expireIndex ON device_share (share_expire);
      create index statusIndex ON device_share (share_status);

      2.insert a new record:
      insert into device_share(device_id,share_status,share_expire) values ('d1','ready',false);

      3. update the share_expire value to fase with ttl 20
      update device_share using ttl 20 set share_expire = false where device_id = 'd1';

      4.after 20 seconds, can retrieve the record with condition where share_expire = false, but the record in the console show the share_expire is null.

      cqlsh:test> select * from device_share where device_id ='d1' and share_status='ready' and share_expire = false allow filtering;

      device_id | share_expire | share_status
      -----------------------------------
      d1 | null | ready

      is this a bug?

      Attachments

        1. attatchment.txt
          0.8 kB
          ruilonghe1988
        2. attatchment.txt
          0.8 kB
          ruilonghe1988

        Activity

          People

            blerer Benjamin Lerer
            ruilong ruilonghe1988
            Benjamin Lerer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: