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

SAI does not index empty bytes even for types that allow empty bytes as a valid input

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-rc1, 5.0, 5.1
    • Feature/SAI
    • None

    Description

      This is easy to reproduce with a test that looks something like this:

      @Test
      public void testEmptyString()
      {
          createTable("CREATE TABLE %s (k TEXT PRIMARY KEY, v text)");
          createIndex(String.format(CREATE_INDEX_TEMPLATE, 'v'));
      
          execute("INSERT INTO %s (k, v) VALUES ('0', '')");
          execute("INSERT INTO %s (k) VALUES ('1')");
          
          // flush(); <---- there is not always a memtable index involved, a fix will have to pay attention to this
      
          List<Row> rows = executeNet("SELECT * FROM %s WHERE v = ''").all();
          assertEquals(1, rows.size()); <— FAILS! No matches...
      }
      

      Attachments

        1. result_details.tar.gz
          38.10 MB
          Caleb Rackliffe
        2. ci_summary.html
          7 kB
          Caleb Rackliffe

        Activity

          People

            maedhroz Caleb Rackliffe
            maedhroz Caleb Rackliffe
            Caleb Rackliffe, David Capwell
            David Capwell
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 2h 10m
                2h 10m