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

Unable to use conditions on static columns for DELETE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1.12, 2.2.4, 3.0.0
    • Legacy/CQL
    • None
    • Cassandra 2.2.0

    • Normal

    Description

      cqlsh:test> create table static_table(id int, stat int static, ord int, val text, primary key(id,ord));
      cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
      cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
      Invalid syntax at line 1, char 55
        delete from static_table where id=1 and ord=1 if stat != 1;
                                                              ^
      

      Same error if using =, <, <=, >= or > condition
      According to thobbs the syntax should work. Plus, the error message is wrong

      Attachments

        1. 10264-2.1.txt
          4 kB
          Benjamin Lerer
        2. 10264-3.0.txt
          4 kB
          Benjamin Lerer
        3. 10264-2.1-V2.txt
          6 kB
          Benjamin Lerer
        4. 10264-3.0-V2.txt
          16 kB
          Benjamin Lerer

        Activity

          People

            blerer Benjamin Lerer
            doanduyhai DuyHai Doan
            Benjamin Lerer
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: