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

Add keyspace option to DROP INDEX statement

    XMLWordPrintableJSON

    Details

      Description

      Actually drop index statement syntax is:

      DROP INDEX IF EXISTS index_name
      

      However, keyspace can be specified in drop table statement:

      DROP TABLE IF EXISTS keyspace_name.table_name
      

      And it's also used in index creation statement:

      CREATE CUSTOM INDEX IF NOT EXISTS index_name
      ON keyspace_name.table_name ( column_name )
      USING (class_name) (WITH OPTIONS = map)
      

      I think it could be useful add the optional keyspace name to the drop index statement:

      DROP INDEX IF EXISTS keyspace_name.index_name
      

      Thus it would be possible to delete an index without using the USE statement. I attach a patch for doing this.

        Attachments

        1. drop-index-with-keyspace.diff.txt
          5 kB
          Andres de la Peña

          Issue Links

            Activity

              People

              • Assignee:
                adelapena Andres de la Peña
                Reporter:
                adelapena Andres de la Peña
                Authors:
                Andres de la Peña
                Reviewers:
                Tom Hobbs
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: