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

Queries returning static content when the partition has no rows might fail to return some rows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-rc2, 4.0
    • CQL/Interpreter
    • None

    Description

      The problem can be reproduced with the following test:

          @Test
          public void testStaticColumnDeletionWithMultipleStaticColumns() throws Throwable
          {
              createTable("CREATE TABLE %s (pk int, ck int, s1 int static, s2 int static, v int, PRIMARY KEY(pk, ck))");
              execute("INSERT INTO %s (pk, s1, s2) VALUES (1, 1, 1) USING TIMESTAMP 1000");
              flush();
              execute("INSERT INTO %s (pk, s1) VALUES (1, 2) USING TIMESTAMP 2000");
              flush();
              execute("DELETE s1 FROM %s USING TIMESTAMP 3000 WHERE pk = 1");
              flush();
              assertRows(execute("SELECT * FROM %s WHERE pk=1"), row(1, null, null, 1, null));
              assertRows(execute("SELECT s1, s2 FROM %s WHERE pk=1"), row((Integer) null, 1));
              assertRows(execute("SELECT s1 FROM %s WHERE pk=1"), row((Integer) null)); // <-FAIL
          }
      

      This problem is a regression in 4.0 and trunk

      Attachments

        Issue Links

          Activity

            People

              blerer Benjamin Lerer
              blerer Benjamin Lerer
              Benjamin Lerer
              Andres de la Peña, Jacek Lewandowski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 50m
                  4h 50m