Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11136 SASI index options validation
  3. CASSANDRA-11134

[SASI Pre-QA] Index creation should respect IF NOT EXISTS

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.4
    • Legacy/CQL
    • None
    • Tested from build CASSANDRA-11067

    Description

      Tested from build CASSANDRA-11067

      CREATE KEYSPACE music WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;
      
      CREATE TABLE music.albums (
          id int PRIMARY KEY,
          country text,
          title text
      );
      
      CREATE CUSTOM INDEX IF NOT EXISTS ON albums (country) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode':'PREFIX'};
      
      CREATE CUSTOM INDEX IF NOT EXISTS ON albums (country) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode':'PREFIX'};
      
      InvalidRequest: code=2200 [Invalid query] message="Index albums_country_idx_1 is a duplicate of existing index albums_country_idx"
      
      

      The index creation should respect IF NOT EXISTS semantics and not create a duplicate index if there is already one index on the same column

      Attachments

        Activity

          People

            xedin Pavel Yaskevich
            doanduyhai DuyHai Doan
            Pavel Yaskevich
            Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: