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

Inconsistent behavior for '= null' conditions on static columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1.15, 2.2.7, 3.0.8, 3.8
    • Legacy/CQL
    • None
    • cassandra-2.1.8 on Ubuntu 15.04

    • Normal

    Description

      Both inserting a row (in a non-existent partition) and updating a static column in the same LWT fails. Creating the partition before performing the LWT works.

      Table Definition

      create table txtable(pcol bigint, ccol bigint, scol bigint static, ncol text, primary key((pcol), ccol));
      

      Inserting row in non-existent partition and updating static column in one LWT

      begin batch
          insert into txtable (pcol, ccol, ncol) values (1, 1, 'A');
          update txtable set scol = 1 where pcol = 1 if scol = null;
      apply batch;
      
      [applied]
      -----------
           False
      

      Creating partition before LWT

      insert into txtable (pcol, scol) values (1, null) if not exists;
      
      begin batch
          insert into txtable (pcol, ccol, ncol) values (1, 1, 'A');
          update txtable set scol = 1 where pcol = 1 if scol = null;
      apply batch;
      
      [applied]
      -----------
           True
      

      Attachments

        1. 9842-3.0.txt
          14 kB
          Benjamin Lerer
        2. 9842-2.1.txt
          17 kB
          Benjamin Lerer

        Issue Links

          Activity

            People

              ifesdjeen Alex Petrov
              tuxychandru Chandra Sekar
              Alex Petrov
              Benjamin Lerer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: