Caleb Rackliffe created CASSANDRA-19461:
-------------------------------------------

             Summary: SAI does not index empty bytes even for types that allow 
empty bytes as a valid input
                 Key: CASSANDRA-19461
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19461
             Project: Cassandra
          Issue Type: Bug
          Components: Feature/SAI
            Reporter: Caleb Rackliffe


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

{noformat}
@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...
}
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to