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

Prepared statements using functions in collection literals aren't invalidated when functions are dropped

    XMLWordPrintableJSON

Details

    Description

      When a function is dropped, any prepared statements which reference it need to be removed from the prepared statement cache.
      The default implementation of Term#usesFunction in Term.NonTerminal is not overriden in all the places it should be. The DelayedValue classes in Lists, Sets, Maps and Tuples may all make use of function calls.

      CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
      CREATE TABLE ks.t1 (k int PRIMARY KEY, v list<int>);
      CREATE FUNCTION ks.echo_int(input int) RETURNS int LANGUAGE javascript AS 'input';
      

      a prepared statement of the form:

      INSERT INTO ks.t1 (k, v) VALUES (?, [ks.echo_int(?)]);
      

      should be dropped when ks.echo_int(int) is, but currently that isn't the case.

      Attachments

        Activity

          People

            samt Sam Tunnicliffe
            samt Sam Tunnicliffe
            Sam Tunnicliffe
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: